/* Generated by Cython 0.29.32 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NPY_NO_DEPRECATED_API",
                "0"
            ]
        ],
        "depends": [
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h",
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h",
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h",
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h",
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include/numpy/npy_common.h",
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h",
            "pandas/_libs/tslibs/src/datetime/np_datetime.h",
            "pandas/_libs/tslibs/src/datetime/np_datetime_strings.h"
        ],
        "include_dirs": [
            "./pandas/_libs/tslibs",
            "pandas/_libs/tslibs",
            "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pandas/1.5.1-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/core/include"
        ],
        "language": "c",
        "name": "pandas._libs.tslibs.offsets",
        "sources": [
            "pandas/_libs/tslibs/offsets.pyx",
            "pandas/_libs/tslibs/src/datetime/np_datetime.c"
        ]
    },
    "module_name": "pandas._libs.tslibs.offsets"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_32"
#define CYTHON_HEX_VERSION 0x001D20F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#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_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #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
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

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

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

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

#define __PYX_HAVE__pandas___libs__tslibs__offsets
#define __PYX_HAVE_API__pandas___libs__tslibs__offsets
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"

    /* NumPy API declarations from "numpy/__init__.pxd" */
    
#include "datetime.h"

    PyObject* char_to_string(const char* data) {
        return PyUnicode_FromString(data);
    }
    
#include "numpy/npy_common.h"
#include "src/datetime/np_datetime.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

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

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "pandas/_libs/tslibs/offsets.pyx",
  "pandas/_libs/tslibs/offsets.pxd",
  "stringsource",
  "__init__.pxd",
  "datetime.pxd",
  "pandas/_libs/tslibs/util.pxd",
  "type.pxd",
  "pandas/_libs/tslibs/conversion.pxd",
  "pandas/_libs/tslibs/dtypes.pxd",
  "pandas/_libs/tslibs/nattype.pxd",
  "pandas/_libs/tslibs/timedeltas.pxd",
  "pandas/_libs/tslibs/base.pxd",
  "pandas/_libs/tslibs/timestamps.pxd",
};
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

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


/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":689
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":690
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":691
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":692
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":696
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":697
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":698
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":699
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":703
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":704
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":713
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":714
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":715
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":717
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":718
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":719
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":721
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":722
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":724
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":725
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":726
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_6pandas_5_libs_6tslibs_10conversion__TSObject;
struct __pyx_obj_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase;
struct __pyx_obj_6pandas_5_libs_6tslibs_7nattype__NaT;
struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta;
struct __pyx_obj_6pandas_5_libs_6tslibs_4base_ABCTimestamp;
struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Day;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Hour;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Minute;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Second;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Milli;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Micro;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Nano;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply;
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":728
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":729
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":730
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":732
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_ctuple_0fa544____dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__etc;
typedef struct __pyx_ctuple_0fa544____dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__etc __pyx_ctuple_0fa544____dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__etc;

/* "pandas/_libs/tslibs/ccalendar.pxd":7
 * )
 * 
 * ctypedef (int32_t, int32_t, int32_t) iso_calendar_t             # <<<<<<<<<<<<<<
 * 
 * cdef int dayofweek(int y, int m, int d) nogil
 */
struct __pyx_ctuple_0fa544____dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__etc {
  __pyx_t_5numpy_int32_t f0;
  __pyx_t_5numpy_int32_t f1;
  __pyx_t_5numpy_int32_t f2;
};
typedef __pyx_ctuple_0fa544____dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__and___dunderpyx_t_5numpy_int32_t__etc __pyx_t_6pandas_5_libs_6tslibs_9ccalendar_iso_calendar_t;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_11np_datetime_check_dts_bounds;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_11np_datetime_astype_overflowsafe;

/* "pandas/_libs/tslibs/np_datetime.pxd":76
 * cdef bint cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1
 * 
 * cdef check_dts_bounds(npy_datetimestruct *dts, NPY_DATETIMEUNIT unit=?)             # <<<<<<<<<<<<<<
 * 
 * cdef int64_t dtstruct_to_dt64(npy_datetimestruct* dts) nogil
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_11np_datetime_check_dts_bounds {
  int __pyx_n;
  NPY_DATETIMEUNIT unit;
};

/* "pandas/_libs/tslibs/np_datetime.pxd":100
 * cdef NPY_DATETIMEUNIT get_unit_from_dtype(cnp.dtype dtype)
 * 
 * cpdef cnp.ndarray astype_overflowsafe(             # <<<<<<<<<<<<<<
 *     cnp.ndarray values,  # ndarray[datetime64[anyunit]]
 *     cnp.dtype dtype,  # ndarray[datetime64[anyunit]]
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_11np_datetime_astype_overflowsafe {
  int __pyx_n;
  int copy;
  int round_ok;
};
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10conversion_convert_to_tsobject;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10conversion_convert_datetime_to_tsobject;
struct __pyx_ctuple___dunderpyx_t_5numpy_int64_t__and_int;
typedef struct __pyx_ctuple___dunderpyx_t_5numpy_int64_t__and_int __pyx_ctuple___dunderpyx_t_5numpy_int64_t__and_int;

/* "pandas/_libs/tslibs/conversion.pxd":25
 * 
 * 
 * cdef _TSObject convert_to_tsobject(object ts, tzinfo tz, str unit,             # <<<<<<<<<<<<<<
 *                                    bint dayfirst, bint yearfirst,
 *                                    int32_t nanos=*)
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10conversion_convert_to_tsobject {
  int __pyx_n;
  __pyx_t_5numpy_int32_t nanos;
};

/* "pandas/_libs/tslibs/conversion.pxd":29
 *                                    int32_t nanos=*)
 * 
 * cdef _TSObject convert_datetime_to_tsobject(datetime ts, tzinfo tz,             # <<<<<<<<<<<<<<
 *                                             int32_t nanos=*,
 *                                             NPY_DATETIMEUNIT reso=*)
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10conversion_convert_datetime_to_tsobject {
  int __pyx_n;
  __pyx_t_5numpy_int32_t nanos;
  NPY_DATETIMEUNIT reso;
};

/* "pandas/_libs/tslibs/conversion.pxd":37
 * cpdef datetime localize_pydatetime(datetime dt, tzinfo tz)
 * cdef int64_t cast_from_unit(object ts, str unit) except? -1
 * cpdef (int64_t, int) precision_from_unit(str unit)             # <<<<<<<<<<<<<<
 * 
 * cdef maybe_localize_tso(_TSObject obj, tzinfo tz, NPY_DATETIMEUNIT reso)
 */
struct __pyx_ctuple___dunderpyx_t_5numpy_int64_t__and_int {
  __pyx_t_5numpy_int64_t f0;
  int f1;
};
struct __pyx_opt_args_6pandas_5_libs_6tslibs_6dtypes_periods_per_day;

/* "pandas/_libs/tslibs/dtypes.pxd":14
 * cdef dict attrname_to_abbrevs
 * 
 * cdef enum c_FreqGroup:             # <<<<<<<<<<<<<<
 *     # Mirrors FreqGroup in the .pyx file
 *     FR_ANN = 1000
 */
enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_c_FreqGroup {
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_ANN = 0x3E8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_QTR = 0x7D0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_MTH = 0xBB8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_WK = 0xFA0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_BUS = 0x1388,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_DAY = 0x1770,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_HR = 0x1B58,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_MIN = 0x1F40,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_SEC = 0x2328,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_MS = 0x2710,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_US = 0x2AF8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_NS = 0x2EE0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_FR_UND = -10000L
};

/* "pandas/_libs/tslibs/dtypes.pxd":31
 * 
 * 
 * cdef enum c_Resolution:             # <<<<<<<<<<<<<<
 *     # Mirrors Resolution in the .pyx file
 *     RESO_NS = 0
 */
enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_c_Resolution {
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_NS = 0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_US = 1,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_MS = 2,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_SEC = 3,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_MIN = 4,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_HR = 5,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_DAY = 6,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_MTH = 7,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_QTR = 8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_RESO_YR = 9
};

/* "pandas/_libs/tslibs/dtypes.pxd":45
 * 
 * 
 * cdef enum PeriodDtypeCode:             # <<<<<<<<<<<<<<
 *     # Annual freqs with various fiscal year ends.
 *     # eg, 2005 for A_FEB runs Mar 1, 2004 to Feb 28, 2005
 */
enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode {
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A = 0x3E8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_DEC = 0x3E8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_JAN = 0x3E9,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_FEB = 0x3EA,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_MAR = 0x3EB,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_APR = 0x3EC,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_MAY = 0x3ED,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_JUN = 0x3EE,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_JUL = 0x3EF,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_AUG = 0x3F0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_SEP = 0x3F1,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_OCT = 0x3F2,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_A_NOV = 0x3F3,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_DEC = 0x7D0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_JAN = 0x7D1,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_FEB = 0x7D2,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_MAR = 0x7D3,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_APR = 0x7D4,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_MAY = 0x7D5,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_JUN = 0x7D6,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_JUL = 0x7D7,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_AUG = 0x7D8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_SEP = 0x7D9,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_OCT = 0x7DA,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_NOV = 0x7DB,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_M = 0xBB8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_SUN = 0xFA0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_MON = 0xFA1,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_TUE = 0xFA2,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_WED = 0xFA3,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_THU = 0xFA4,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_FRI = 0xFA5,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_SAT = 0xFA6,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_B = 0x1388,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_D = 0x1770,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_H = 0x1B58,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_T = 0x1F40,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_S = 0x2328,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_L = 0x2710,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_U = 0x2AF8,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_N = 0x2EE0,
  __pyx_e_6pandas_5_libs_6tslibs_6dtypes_UNDEFINED = -10000L
};

/* "pandas/_libs/tslibs/dtypes.pxd":9
 * cdef NPY_DATETIMEUNIT abbrev_to_npy_unit(str abbrev)
 * cdef NPY_DATETIMEUNIT freq_group_code_to_npy_unit(int freq) nogil
 * cpdef int64_t periods_per_day(NPY_DATETIMEUNIT reso=*) except? -1             # <<<<<<<<<<<<<<
 * cpdef int64_t periods_per_second(NPY_DATETIMEUNIT reso) except? -1
 * 
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_6dtypes_periods_per_day {
  int __pyx_n;
  NPY_DATETIMEUNIT reso;
};
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_10_Timedelta__as_reso;

/* "timedeltas.pxd":8
 * 
 * # Exposed for tslib, not intended for outside use.
 * cpdef int64_t delta_to_nanoseconds(             # <<<<<<<<<<<<<<
 *     delta, NPY_DATETIMEUNIT reso=*, bint round_ok=*
 * ) except? -1
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds {
  int __pyx_n;
  NPY_DATETIMEUNIT reso;
  int round_ok;
};

/* "timedeltas.pxd":27
 *     cdef _ensure_components(_Timedelta self)
 *     cdef inline bint _compare_mismatched_resos(self, _Timedelta other, op)
 *     cdef _Timedelta _as_reso(self, NPY_DATETIMEUNIT reso, bint round_ok=*)             # <<<<<<<<<<<<<<
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_10_Timedelta__as_reso {
  int __pyx_n;
  int round_ok;
};
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_create_timestamp_from_ts;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_10_Timestamp_to_pydatetime;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_10_Timestamp__as_reso;

/* "timestamps.pxd":15
 * 
 * 
 * cdef _Timestamp create_timestamp_from_ts(int64_t value,             # <<<<<<<<<<<<<<
 *                                          npy_datetimestruct dts,
 *                                          tzinfo tz,
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_create_timestamp_from_ts {
  int __pyx_n;
  NPY_DATETIMEUNIT reso;
};

/* "timestamps.pxd":34
 *     cdef bint _can_compare(self, datetime other)
 *     cpdef to_datetime64(self)
 *     cpdef datetime to_pydatetime(_Timestamp self, bint warn=*)             # <<<<<<<<<<<<<<
 *     cdef bint _compare_outside_nanorange(_Timestamp self, datetime other,
 *                                          int op) except -1
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_10_Timestamp_to_pydatetime {
  int __pyx_n;
  int warn;
};

/* "timestamps.pxd":40
 *     cdef _warn_on_field_deprecation(_Timestamp self, freq, str field)
 *     cdef bint _compare_mismatched_resos(_Timestamp self, _Timestamp other, int op)
 *     cdef _Timestamp _as_reso(_Timestamp self, NPY_DATETIMEUNIT reso, bint round_ok=*)             # <<<<<<<<<<<<<<
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_10_Timestamp__as_reso {
  int __pyx_n;
  int round_ok;
};
struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets_shift_quarters;
struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets__shift_bdays;

/* "pandas/_libs/tslibs/offsets.pyx":4042
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cdef ndarray shift_quarters(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,
 *     int quarters,
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets_shift_quarters {
  int __pyx_n;
  int modby;
  NPY_DATETIMEUNIT reso;
};

/* "pandas/_libs/tslibs/offsets.pyx":4192
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cdef ndarray _shift_bdays(             # <<<<<<<<<<<<<<
 *     ndarray i8other,
 *     int periods,
 */
struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets__shift_bdays {
  int __pyx_n;
  NPY_DATETIMEUNIT reso;
};

/* "pandas/_libs/tslibs/conversion.pxd":17
 * 
 * 
 * cdef class _TSObject:             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         npy_datetimestruct dts      # npy_datetimestruct
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_10conversion__TSObject {
  PyObject_HEAD
  npy_datetimestruct dts;
  __pyx_t_5numpy_int64_t value;
  PyDateTime_TZInfo *tzinfo;
  int fold;
};


/* "pandas/_libs/tslibs/dtypes.pxd":99
 * 
 * 
 * cdef class PeriodDtypeBase:             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         PeriodDtypeCode _dtype_code
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase *__pyx_vtab;
  enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode _dtype_code;
};


/* "pandas/_libs/tslibs/nattype.pxd":9
 * cdef set c_nat_strings
 * 
 * cdef class _NaT(datetime):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7nattype__NaT {
  PyDateTime_DateTime __pyx_base;
  __pyx_t_5numpy_int64_t value;
};


/* "timedeltas.pxd":16
 * 
 * 
 * cdef class _Timedelta(timedelta):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value      # nanoseconds
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta {
  PyDateTime_Delta __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *__pyx_vtab;
  __pyx_t_5numpy_int64_t value;
  int _is_populated;
  __pyx_t_5numpy_int64_t _d;
  __pyx_t_5numpy_int64_t _h;
  __pyx_t_5numpy_int64_t _m;
  __pyx_t_5numpy_int64_t _s;
  __pyx_t_5numpy_int64_t _ms;
  __pyx_t_5numpy_int64_t _us;
  __pyx_t_5numpy_int64_t _ns;
  NPY_DATETIMEUNIT _reso;
};


/* "pandas/_libs/tslibs/base.pxd":4
 * 
 * 
 * cdef class ABCTimestamp(datetime):             # <<<<<<<<<<<<<<
 *     pass
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_4base_ABCTimestamp {
  PyDateTime_DateTime __pyx_base;
};


/* "timestamps.pxd":23
 * 
 * 
 * cdef class _Timestamp(ABCTimestamp):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value, nanosecond, year
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp {
  struct __pyx_obj_6pandas_5_libs_6tslibs_4base_ABCTimestamp __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_vtab;
  __pyx_t_5numpy_int64_t value;
  __pyx_t_5numpy_int64_t nanosecond;
  __pyx_t_5numpy_int64_t year;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *_freq;
  NPY_DATETIMEUNIT _reso;
};


/* "pandas/_libs/tslibs/offsets.pxd":8
 * cdef bint is_tick_object(object obj)
 * 
 * cdef class BaseOffset:             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t n
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset {
  PyObject_HEAD
  __pyx_t_5numpy_int64_t n;
  int normalize;
  PyObject *_cache;
};


/* "pandas/_libs/tslibs/offsets.pyx":933
 * 
 * 
 * cdef class SingleConstructorOffset(BaseOffset):             # <<<<<<<<<<<<<<
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":956
 * # Tick Offsets
 * 
 * cdef class Tick(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     _adjust_dst = False
 *     _prefix = "undefined"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_vtab;
};


/* "pandas/_libs/tslibs/offsets.pyx":1142
 * 
 * 
 * cdef class Day(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 24 * 3600 * 1_000_000_000
 *     _prefix = "D"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Day {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1150
 * 
 * 
 * cdef class Hour(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 3600 * 1_000_000_000
 *     _prefix = "H"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Hour {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1158
 * 
 * 
 * cdef class Minute(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 60 * 1_000_000_000
 *     _prefix = "T"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Minute {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1166
 * 
 * 
 * cdef class Second(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1_000_000_000
 *     _prefix = "S"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Second {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1174
 * 
 * 
 * cdef class Milli(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1_000_000
 *     _prefix = "L"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Milli {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1182
 * 
 * 
 * cdef class Micro(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1000
 *     _prefix = "U"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Micro {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1190
 * 
 * 
 * cdef class Nano(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1
 *     _prefix = "N"
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Nano {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1223
 * # --------------------------------------------------------------------
 * 
 * cdef class RelativeDeltaOffset(BaseOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass backed by a dateutil relativedelta object.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1491
 * 
 * 
 * cdef class BusinessMixin(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Mixin to business types to provide related functions.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_vtab;
  PyDateTime_Delta *_offset;
  PyObject *weekmask;
  PyObject *holidays;
  PyObject *calendar;
};


/* "pandas/_libs/tslibs/offsets.pyx":1559
 * 
 * 
 * cdef class BusinessDay(BusinessMixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing possibly n business days.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":1672
 * 
 * 
 * cdef class BusinessHour(BusinessMixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing possibly n business hours.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_base;
  PyObject *start;
  PyObject *end;
};


/* "pandas/_libs/tslibs/offsets.pyx":2064
 * 
 * 
 * cdef class WeekOfMonthMixin(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Mixin for methods common to WeekOfMonth and LastWeekOfMonth.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  int weekday;
  int week;
};


/* "pandas/_libs/tslibs/offsets.pyx":2107
 * # Year-Based Offset Classes
 * 
 * cdef class YearOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset that just needs a month.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_vtab;
  int month;
};


/* "pandas/_libs/tslibs/offsets.pyx":2174
 * 
 * 
 * cdef class BYearEnd(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the last business day of the year.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2200
 * 
 * 
 * cdef class BYearBegin(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the first business day of the year.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2224
 * 
 * 
 * cdef class YearEnd(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between calendar year ends.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
  int _period_dtype_code;
};


/* "pandas/_libs/tslibs/offsets.pyx":2249
 * 
 * 
 * cdef class YearBegin(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between calendar year begin dates.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2268
 * # Quarter-Based Offset Classes
 * 
 * cdef class QuarterOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "startingMonth"])
 *     # TODO: Consider combining QuarterOffset and YearOffset __init__ at some
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_vtab;
  int startingMonth;
};


/* "pandas/_libs/tslibs/offsets.pyx":2340
 * 
 * 
 * cdef class BQuarterEnd(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the last business day of each Quarter.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2368
 * 
 * 
 * cdef class BQuarterBegin(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the first business day of each Quarter.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2396
 * 
 * 
 * cdef class QuarterEnd(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between Quarter end dates.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
  int _period_dtype_code;
};


/* "pandas/_libs/tslibs/offsets.pyx":2424
 * 
 * 
 * cdef class QuarterBegin(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between Quarter start dates.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2447
 * # Month-Based Offset Classes
 * 
 * cdef class MonthOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_vtab;
};


/* "pandas/_libs/tslibs/offsets.pyx":2474
 * 
 * 
 * cdef class MonthEnd(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset of one month end.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2489
 * 
 * 
 * cdef class MonthBegin(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset of one month at beginning.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2503
 * 
 * 
 * cdef class BusinessMonthEnd(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the last business day of the month.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2522
 * 
 * 
 * cdef class BusinessMonthBegin(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset of one month at the first business day.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2544
 * # Semi-Month Based Offsets
 * 
 * cdef class SemiMonthOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     _default_day_of_month = 15
 *     _min_day_of_month = 2
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_vtab;
  int day_of_month;
};


/* "pandas/_libs/tslibs/offsets.pyx":2675
 * 
 * 
 * cdef class SemiMonthEnd(SemiMonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Two DateOffset's per month repeating on the last day of the month & day_of_month.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2702
 * 
 * 
 * cdef class SemiMonthBegin(SemiMonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Two DateOffset's per month repeating on the first day of the month & day_of_month.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":2731
 * 
 * 
 * cdef class Week(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Weekly offset.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_vtab;
  PyObject *weekday;
  int _period_dtype_code;
};


/* "pandas/_libs/tslibs/offsets.pyx":2881
 * 
 * 
 * cdef class WeekOfMonth(WeekOfMonthMixin):             # <<<<<<<<<<<<<<
 *     """
 *     Describes monthly dates like "the Tuesday of the 2nd week of each month".
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_vtab;
};


/* "pandas/_libs/tslibs/offsets.pyx":2953
 * 
 * 
 * cdef class LastWeekOfMonth(WeekOfMonthMixin):             # <<<<<<<<<<<<<<
 *     """
 *     Describes monthly dates in last week of month.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_vtab;
};


/* "pandas/_libs/tslibs/offsets.pyx":3026
 * # Special Offset Classes
 * 
 * cdef class FY5253Mixin(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int startingMonth
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_vtab;
  int startingMonth;
  int weekday;
  PyObject *variation;
};


/* "pandas/_libs/tslibs/offsets.pyx":3079
 * 
 * 
 * cdef class FY5253(FY5253Mixin):             # <<<<<<<<<<<<<<
 *     """
 *     Describes 52-53 week fiscal year. This is also known as a 4-4-5 calendar.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":3253
 * 
 * 
 * cdef class FY5253Quarter(FY5253Mixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between business quarter dates for 52-53 week fiscal year.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin __pyx_base;
  int qtr_with_extra_week;
};


/* "pandas/_libs/tslibs/offsets.pyx":3484
 * 
 * 
 * cdef class Easter(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset for the Easter holiday using logic defined in dateutil.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset __pyx_base;
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_vtab;
};


/* "pandas/_libs/tslibs/offsets.pyx":3540
 * 
 * 
 * cdef class CustomBusinessDay(BusinessDay):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing custom business days excluding holidays.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":3626
 * 
 * 
 * cdef class CustomBusinessHour(BusinessHour):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing possibly n custom business days.
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":3671
 * 
 * 
 * cdef class _CustomBusinessMonth(BusinessMixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing custom business month(s).
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":3768
 * 
 * 
 * cdef class CustomBusinessMonthEnd(_CustomBusinessMonth):             # <<<<<<<<<<<<<<
 *     _prefix = "CBM"
 * 
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":3772
 * 
 * 
 * cdef class CustomBusinessMonthBegin(_CustomBusinessMonth):             # <<<<<<<<<<<<<<
 *     _prefix = "CBMS"
 * 
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth __pyx_base;
};


/* "pandas/_libs/tslibs/offsets.pyx":125
 * 
 * 
 * def apply_array_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps {
  PyObject_HEAD
  PyObject *__pyx_v_func;
};


/* "pandas/_libs/tslibs/offsets.pyx":139
 * 
 * 
 * def apply_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps {
  PyObject_HEAD
  PyObject *__pyx_v_func;
};


/* "pandas/_libs/tslibs/offsets.pyx":300
 * 
 * 
 * cdef _determine_offset(kwds):             # <<<<<<<<<<<<<<
 *     # timedelta is used for sub-daily plural offsets and all singular
 *     # offsets, relativedelta is used for plural offsets of daily length or
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset {
  PyObject_HEAD
  PyObject *__pyx_v__kwds_use_relativedelta;
  PyObject *__pyx_v_kwds;
  PyObject *__pyx_v_kwds_no_nanos;
};


/* "pandas/_libs/tslibs/offsets.pyx":305
 *     # more, nanosecond(s) are handled by apply_wraps
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()             # <<<<<<<<<<<<<<
 *         if k not in ('nanosecond', 'nanoseconds')
 *     )
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *__pyx_outer_scope;
  PyObject *__pyx_v_k;
  PyObject *__pyx_v_v;
};


/* "pandas/_libs/tslibs/offsets.pyx":317
 *     use_relativedelta = False
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):             # <<<<<<<<<<<<<<
 *             if "millisecond" in kwds_no_nanos:
 *                 raise NotImplementedError(
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *__pyx_outer_scope;
  PyObject *__pyx_v_k;
};


/* "pandas/_libs/tslibs/offsets.pyx":330
 *             # sub-daily offset - use timedelta (tz-aware)
 *             offset = timedelta(**kwds_no_nanos)
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):             # <<<<<<<<<<<<<<
 *         offset = timedelta(days=0)
 *     else:
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *__pyx_outer_scope;
  PyObject *__pyx_v_nano;
};


/* "pandas/_libs/tslibs/offsets.pyx":941
 *         return cls()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # This __reduce__ implementation is for all BaseOffset subclasses
 *         #  except for RelativeDeltaOffset
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset *__pyx_v_self;
};


/* "pandas/_libs/tslibs/offsets.pyx":947
 *         #  from attributes that do get pickled.
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None             # <<<<<<<<<<<<<<
 *             for attr in self._attributes
 *         )
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *__pyx_outer_scope;
  PyObject *__pyx_v_attr;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "pandas/_libs/tslibs/offsets.pyx":1765
 *         BusinessMixin.__setstate__(self, state)
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         out = super()._repr_attrs()
 *         # Use python string formatting to be faster than strftime
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self;
};


/* "pandas/_libs/tslibs/offsets.pyx":1769
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *__pyx_outer_scope;
  PyObject *__pyx_v_en;
  PyObject *__pyx_v_st;
};


/* "pandas/_libs/tslibs/offsets.pyx":1931
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # used for detecting edge condition
 *         nanosecond = getattr(other, "nanosecond", 0)
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self;
};


/* "pandas/_libs/tslibs/offsets.pyx":1961
 *         # get total business hours by sec in one business day
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */
struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *__pyx_outer_scope;
  PyObject *__pyx_v_en;
  PyObject *__pyx_v_st;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};



/* "pandas/_libs/tslibs/dtypes.pxd":99
 * 
 * 
 * cdef class PeriodDtypeBase:             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         PeriodDtypeCode _dtype_code
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase {
  int (*_get_to_timestamp_base)(struct __pyx_obj_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase *__pyx_vtabptr_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase;


/* "timedeltas.pxd":16
 * 
 * 
 * cdef class _Timedelta(timedelta):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value      # nanoseconds
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta {
  PyDateTime_Delta *(*to_pytimedelta)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *, int __pyx_skip_dispatch);
  int (*_has_ns)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *);
  PyObject *(*_ensure_components)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *);
  int (*_compare_mismatched_resos)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *, struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *, PyObject *);
  struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *(*_as_reso)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *, NPY_DATETIMEUNIT, struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_10_Timedelta__as_reso *__pyx_optional_args);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *__pyx_vtabptr_6pandas_5_libs_6tslibs_10timedeltas__Timedelta;


/* "timestamps.pxd":23
 * 
 * 
 * cdef class _Timestamp(ABCTimestamp):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value, nanosecond, year
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp {
  int (*_get_start_end_field)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, PyObject *, PyObject *);
  PyObject *(*_get_date_name_field)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, PyObject *, PyObject *);
  __pyx_t_5numpy_int64_t (*_maybe_convert_value_to_local)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *);
  int (*_can_compare)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, PyDateTime_DateTime *);
  PyObject *(*to_datetime64)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, int __pyx_skip_dispatch);
  PyDateTime_DateTime *(*to_pydatetime)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_10_Timestamp_to_pydatetime *__pyx_optional_args);
  int (*_compare_outside_nanorange)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, PyDateTime_DateTime *, int);
  void (*_set_freq)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_warn_on_field_deprecation)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, PyObject *, PyObject *);
  int (*_compare_mismatched_resos)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, int);
  struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *(*_as_reso)(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *, NPY_DATETIMEUNIT, struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timestamps_10_Timestamp__as_reso *__pyx_optional_args);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_vtabptr_6pandas_5_libs_6tslibs_10timestamps__Timestamp;


/* "pandas/_libs/tslibs/offsets.pyx":956
 * # Tick Offsets
 * 
 * cdef class Tick(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     _adjust_dst = False
 *     _prefix = "undefined"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *(*_next_higher_resolution)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;


/* "pandas/_libs/tslibs/offsets.pyx":1142
 * 
 * 
 * cdef class Day(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 24 * 3600 * 1_000_000_000
 *     _prefix = "D"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Day {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Day *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Day;


/* "pandas/_libs/tslibs/offsets.pyx":1150
 * 
 * 
 * cdef class Hour(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 3600 * 1_000_000_000
 *     _prefix = "H"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Hour {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Hour *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Hour;


/* "pandas/_libs/tslibs/offsets.pyx":1158
 * 
 * 
 * cdef class Minute(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 60 * 1_000_000_000
 *     _prefix = "T"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Minute {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Minute *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Minute;


/* "pandas/_libs/tslibs/offsets.pyx":1166
 * 
 * 
 * cdef class Second(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1_000_000_000
 *     _prefix = "S"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Second {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Second *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Second;


/* "pandas/_libs/tslibs/offsets.pyx":1174
 * 
 * 
 * cdef class Milli(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1_000_000
 *     _prefix = "L"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Milli {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Milli *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Milli;


/* "pandas/_libs/tslibs/offsets.pyx":1182
 * 
 * 
 * cdef class Micro(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1000
 *     _prefix = "U"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Micro {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Micro *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Micro;


/* "pandas/_libs/tslibs/offsets.pyx":1190
 * 
 * 
 * cdef class Nano(Tick):             # <<<<<<<<<<<<<<
 *     _nanos_inc = 1
 *     _prefix = "N"
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Nano {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Nano *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Nano;


/* "pandas/_libs/tslibs/offsets.pyx":1491
 * 
 * 
 * cdef class BusinessMixin(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Mixin to business types to provide related functions.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin {
  PyObject *(*_init_custom)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;


/* "pandas/_libs/tslibs/offsets.pyx":1559
 * 
 * 
 * cdef class BusinessDay(BusinessMixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing possibly n business days.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessDay {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessDay;


/* "pandas/_libs/tslibs/offsets.pyx":1672
 * 
 * 
 * cdef class BusinessHour(BusinessMixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing possibly n business hours.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessHour {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessHour;


/* "pandas/_libs/tslibs/offsets.pyx":2107
 * # Year-Based Offset Classes
 * 
 * cdef class YearOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset that just needs a month.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset;


/* "pandas/_libs/tslibs/offsets.pyx":2174
 * 
 * 
 * cdef class BYearEnd(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the last business day of the year.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BYearEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BYearEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2200
 * 
 * 
 * cdef class BYearBegin(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the first business day of the year.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BYearBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BYearBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2224
 * 
 * 
 * cdef class YearEnd(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between calendar year ends.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2249
 * 
 * 
 * cdef class YearBegin(YearOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between calendar year begin dates.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2268
 * # Quarter-Based Offset Classes
 * 
 * cdef class QuarterOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "startingMonth"])
 *     # TODO: Consider combining QuarterOffset and YearOffset __init__ at some
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;


/* "pandas/_libs/tslibs/offsets.pyx":2340
 * 
 * 
 * cdef class BQuarterEnd(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the last business day of each Quarter.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2368
 * 
 * 
 * cdef class BQuarterBegin(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the first business day of each Quarter.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2396
 * 
 * 
 * cdef class QuarterEnd(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between Quarter end dates.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2424
 * 
 * 
 * cdef class QuarterBegin(QuarterOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between Quarter start dates.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2447
 * # Month-Based Offset Classes
 * 
 * cdef class MonthOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset;


/* "pandas/_libs/tslibs/offsets.pyx":2474
 * 
 * 
 * cdef class MonthEnd(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset of one month end.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2489
 * 
 * 
 * cdef class MonthBegin(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset of one month at beginning.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2503
 * 
 * 
 * cdef class BusinessMonthEnd(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between the last business day of the month.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2522
 * 
 * 
 * cdef class BusinessMonthBegin(MonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset of one month at the first business day.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2544
 * # Semi-Month Based Offsets
 * 
 * cdef class SemiMonthOffset(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     _default_day_of_month = 15
 *     _min_day_of_month = 2
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;


/* "pandas/_libs/tslibs/offsets.pyx":2675
 * 
 * 
 * cdef class SemiMonthEnd(SemiMonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Two DateOffset's per month repeating on the last day of the month & day_of_month.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd;


/* "pandas/_libs/tslibs/offsets.pyx":2702
 * 
 * 
 * cdef class SemiMonthBegin(SemiMonthOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Two DateOffset's per month repeating on the first day of the month & day_of_month.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin;


/* "pandas/_libs/tslibs/offsets.pyx":2731
 * 
 * 
 * cdef class Week(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     Weekly offset.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Week {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *, PyObject *, int __pyx_skip_dispatch);
  PyArrayObject *(*_end_apply_index)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *, PyArrayObject *, NPY_DATETIMEUNIT);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Week;


/* "pandas/_libs/tslibs/offsets.pyx":2881
 * 
 * 
 * cdef class WeekOfMonth(WeekOfMonthMixin):             # <<<<<<<<<<<<<<
 *     """
 *     Describes monthly dates like "the Tuesday of the 2nd week of each month".
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth;


/* "pandas/_libs/tslibs/offsets.pyx":2953
 * 
 * 
 * cdef class LastWeekOfMonth(WeekOfMonthMixin):             # <<<<<<<<<<<<<<
 *     """
 *     Describes monthly dates in last week of month.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth;


/* "pandas/_libs/tslibs/offsets.pyx":3026
 * # Special Offset Classes
 * 
 * cdef class FY5253Mixin(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int startingMonth
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;


/* "pandas/_libs/tslibs/offsets.pyx":3079
 * 
 * 
 * cdef class FY5253(FY5253Mixin):             # <<<<<<<<<<<<<<
 *     """
 *     Describes 52-53 week fiscal year. This is also known as a 4-4-5 calendar.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253 {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253;


/* "pandas/_libs/tslibs/offsets.pyx":3253
 * 
 * 
 * cdef class FY5253Quarter(FY5253Mixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset increments between business quarter dates for 52-53 week fiscal year.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter;


/* "pandas/_libs/tslibs/offsets.pyx":3484
 * 
 * 
 * cdef class Easter(SingleConstructorOffset):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset for the Easter holiday using logic defined in dateutil.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Easter {
  PyObject *(*__pyx___setstate__)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Easter;


/* "pandas/_libs/tslibs/offsets.pyx":3540
 * 
 * 
 * cdef class CustomBusinessDay(BusinessDay):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing custom business days excluding holidays.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessDay __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay;


/* "pandas/_libs/tslibs/offsets.pyx":3626
 * 
 * 
 * cdef class CustomBusinessHour(BusinessHour):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing possibly n custom business days.
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessHour __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour;


/* "pandas/_libs/tslibs/offsets.pyx":3671
 * 
 * 
 * cdef class _CustomBusinessMonth(BusinessMixin):             # <<<<<<<<<<<<<<
 *     """
 *     DateOffset subclass representing custom business month(s).
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;


/* "pandas/_libs/tslibs/offsets.pyx":3768
 * 
 * 
 * cdef class CustomBusinessMonthEnd(_CustomBusinessMonth):             # <<<<<<<<<<<<<<
 *     _prefix = "CBM"
 * 
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd;


/* "pandas/_libs/tslibs/offsets.pyx":3772
 * 
 * 
 * cdef class CustomBusinessMonthBegin(_CustomBusinessMonth):             # <<<<<<<<<<<<<<
 *     _prefix = "CBMS"
 * 
 */

struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin {
  struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth __pyx_base;
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin;

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

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

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

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

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

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

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

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

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

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

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

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

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

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

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

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

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

/* MergeKeywords.proto */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(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_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(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

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* pyfrozenset_new.proto */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);

/* PySetContains.proto */
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);

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

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

/* py_dict_pop.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);

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

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

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
#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

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

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

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

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

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

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

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

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

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char);

/* ModInt[long].proto */
static CYTHON_INLINE long __Pyx_mod_long(long, long);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* DivInt[long].proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

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

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

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

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* ModInt[__pyx_t_5numpy_int32_t].proto */
static CYTHON_INLINE __pyx_t_5numpy_int32_t __Pyx_mod___pyx_t_5numpy_int32_t(__pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t);

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

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

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

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

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyObject *dict);

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

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

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* ClassMethod.proto */
#include "descrobject.h"
static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method);

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

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

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

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

/* None.proto */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); /* proto */

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value);

/* CIntFromPy.proto */
static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_DATETIMEUNIT value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE NPY_DATETIMEUNIT __Pyx_PyInt_As_NPY_DATETIMEUNIT(PyObject *);

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value);

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

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

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

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig);

/* FunctionImport.proto */
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

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

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Tick__next_higher_resolution(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin__init_custom(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_10YearOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11MonthOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyArrayObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week__end_apply_index(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyArrayObject *__pyx_v_i8other, NPY_DATETIMEUNIT __pyx_v_reso); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'cpython.buffer' */

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

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

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

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

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
static PyTypeObject *__pyx_ptype_5numpy_number = 0;
static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
static PyTypeObject *__pyx_ptype_5numpy_character = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'datetime' */

/* Module declarations from 'cpython.datetime' */
static PyTypeObject *__pyx_ptype_7cpython_8datetime_date = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_time = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo = 0;
static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void); /*proto*/

/* Module declarations from 'pandas._libs.tslibs' */

/* Module declarations from 'pandas._libs.tslibs.util' */
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_integer_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_float_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_complex_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_bool_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_timedelta64_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_datetime64_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_array(PyObject *); /*proto*/
static CYTHON_INLINE char const *__pyx_f_6pandas_5_libs_6tslibs_4util_get_c_string_buf_and_size(PyObject *, Py_ssize_t *); /*proto*/

/* Module declarations from 'pandas._libs.tslibs.ccalendar' */
static PyObject **__pyx_vp_6pandas_5_libs_6tslibs_9ccalendar_c_MONTH_NUMBERS = 0;
#define __pyx_v_6pandas_5_libs_6tslibs_9ccalendar_c_MONTH_NUMBERS (*__pyx_vp_6pandas_5_libs_6tslibs_9ccalendar_c_MONTH_NUMBERS)
static __pyx_t_5numpy_int32_t **__pyx_vp_6pandas_5_libs_6tslibs_9ccalendar_month_offset = 0;
#define __pyx_v_6pandas_5_libs_6tslibs_9ccalendar_month_offset (*__pyx_vp_6pandas_5_libs_6tslibs_9ccalendar_month_offset)
static int (*__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_dayofweek)(int, int, int); /*proto*/
static __pyx_t_5numpy_int32_t (*__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month)(int, Py_ssize_t, int __pyx_skip_dispatch); /*proto*/
static int (*__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_lastbday)(int, int, int __pyx_skip_dispatch); /*proto*/
static int (*__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_firstbday)(int, int, int __pyx_skip_dispatch); /*proto*/

/* Module declarations from 'pandas._libs.tslibs.np_datetime' */
static void (*__pyx_f_6pandas_5_libs_6tslibs_11np_datetime_pydate_to_dtstruct)(PyDateTime_Date *, npy_datetimestruct *); /*proto*/
static NPY_DATETIMEUNIT (*__pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype)(PyArray_Descr *); /*proto*/

/* Module declarations from 'pandas._libs.tslibs.conversion' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_10conversion__TSObject = 0;
static PyDateTime_DateTime *(*__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime)(PyDateTime_DateTime *, PyDateTime_TZInfo *, int __pyx_skip_dispatch); /*proto*/

/* Module declarations from 'pandas._libs.tslibs.dtypes' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase = 0;
static PyObject **__pyx_vp_6pandas_5_libs_6tslibs_6dtypes_attrname_to_abbrevs = 0;
#define __pyx_v_6pandas_5_libs_6tslibs_6dtypes_attrname_to_abbrevs (*__pyx_vp_6pandas_5_libs_6tslibs_6dtypes_attrname_to_abbrevs)
static __pyx_t_5numpy_int64_t (*__pyx_f_6pandas_5_libs_6tslibs_6dtypes_periods_per_day)(int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5_libs_6tslibs_6dtypes_periods_per_day *__pyx_optional_args); /*proto*/

/* Module declarations from 'pandas._libs.tslibs.nattype' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7nattype__NaT = 0;
static __pyx_t_5numpy_int64_t *__pyx_vp_6pandas_5_libs_6tslibs_7nattype_NPY_NAT = 0;
#define __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT (*__pyx_vp_6pandas_5_libs_6tslibs_7nattype_NPY_NAT)
static PyObject **__pyx_vp_6pandas_5_libs_6tslibs_7nattype_c_nat_strings = 0;
#define __pyx_v_6pandas_5_libs_6tslibs_7nattype_c_nat_strings (*__pyx_vp_6pandas_5_libs_6tslibs_7nattype_c_nat_strings)
static struct __pyx_obj_6pandas_5_libs_6tslibs_7nattype__NaT **__pyx_vp_6pandas_5_libs_6tslibs_7nattype_c_NaT = 0;
#define __pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT (*__pyx_vp_6pandas_5_libs_6tslibs_7nattype_c_NaT)

/* Module declarations from 'pandas._libs.tslibs.timedeltas' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_10timedeltas__Timedelta = 0;
static __pyx_t_5numpy_int64_t (*__pyx_f_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds *__pyx_optional_args); /*proto*/
static int (*__pyx_f_6pandas_5_libs_6tslibs_10timedeltas_is_any_td_scalar)(PyObject *); /*proto*/

/* Module declarations from 'pandas._libs.tslibs.base' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_4base_ABCTimestamp = 0;

/* Module declarations from 'pandas._libs.tslibs.timestamps' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp = 0;

/* Module declarations from 'pandas._libs.tslibs.offsets' */
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253 = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Easter = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply = 0;
static PyTypeObject *__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr = 0;
static PyObject *__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset;
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_to_offset(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyDateTime_DateTime *__pyx_f_6pandas_5_libs_6tslibs_7offsets__as_datetime(PyDateTime_DateTime *); /*proto*/
static int __pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(PyDateTime_DateTime *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__wrap_timedelta_result(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__get_calendar(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__to_dt64D(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__validate_business_time(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyObject *); /*proto*/
static PyDateTime_DateTime *__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_day(PyDateTime_DateTime *, int); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets_year_add_months(npy_datetimestruct, int); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets_month_add_months(npy_datetimestruct, int); /*proto*/
static PyArrayObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_shift_quarters(PyArrayObject *, int, int, PyObject *, struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets_shift_quarters *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_bdays(PyArrayObject *, int, struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets__shift_bdays *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month(npy_datetimestruct *, PyObject *); /*proto*/
static int __pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(int, int, int, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets__roll_qtrday(npy_datetimestruct *, int, int, PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_BaseOffset__set_state(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_RelativeDeltaOffset__set_state(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "pandas._libs.tslibs.offsets"
extern int __pyx_module_is_main_pandas___libs__tslibs__offsets;
int __pyx_module_is_main_pandas___libs__tslibs__offsets = 0;

/* Implementation of 'pandas._libs.tslibs.offsets' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_NotImplemented;
static PyObject *__pyx_builtin_FutureWarning;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_reversed;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_A[] = "A";
static const char __pyx_k_B[] = "B";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_D[] = "D";
static const char __pyx_k_H[] = "H";
static const char __pyx_k_L[] = "L";
static const char __pyx_k_M[] = "M";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_Q[] = "Q";
static const char __pyx_k_S[] = "S";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_U[] = "U";
static const char __pyx_k_W[] = "W";
static const char __pyx_k_Y[] = "Y";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_AS[] = "AS";
static const char __pyx_k_BA[] = "BA";
static const char __pyx_k_BH[] = "BH";
static const char __pyx_k_BM[] = "BM";
static const char __pyx_k_BQ[] = "BQ";
static const char __pyx_k_BY[] = "BY";
static const char __pyx_k_MS[] = "MS";
static const char __pyx_k_QS[] = "QS";
static const char __pyx_k_RE[] = "RE";
static const char __pyx_k_SM[] = "SM";
static const char __pyx_k_YS[] = "YS";
static const char __pyx_k_dy[] = "dy";
static const char __pyx_k_ge[] = "__ge__";
static const char __pyx_k_gt[] = "__gt__";
static const char __pyx_k_i8[] = "i8";
static const char __pyx_k_le[] = "__le__";
static const char __pyx_k_lt[] = "__lt__";
static const char __pyx_k_mi[] = "mi";
static const char __pyx_k_ms[] = "ms";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_ns[] = "ns";
static const char __pyx_k_re[] = "re";
static const char __pyx_k_td[] = "td";
static const char __pyx_k_to[] = " to ";
static const char __pyx_k_tz[] = "tz";
static const char __pyx_k_us[] = "us";
static const char __pyx_k_02d[] = "02d";
static const char __pyx_k_BAS[] = "BAS";
static const char __pyx_k_BMS[] = "BMS";
static const char __pyx_k_BQS[] = "BQS";
static const char __pyx_k_BYS[] = "BYS";
static const char __pyx_k_CBH[] = "CBH";
static const char __pyx_k_CBM[] = "CBM";
static const char __pyx_k_Day[] = "Day";
static const char __pyx_k_H_M[] = "%H:%M";
static const char __pyx_k_Min[] = "Min";
static const char __pyx_k_REQ[] = "REQ";
static const char __pyx_k_SMS[] = "SMS";
static const char __pyx_k_WOM[] = "WOM";
static const char __pyx_k__11[] = "_";
static const char __pyx_k__14[] = "";
static const char __pyx_k__15[] = " * ";
static const char __pyx_k__16[] = "<";
static const char __pyx_k__17[] = ">";
static const char __pyx_k__18[] = "=";
static const char __pyx_k__19[] = ": ";
static const char __pyx_k__20[] = ", ";
static const char __pyx_k__38[] = "+";
static const char __pyx_k__39[] = "-";
static const char __pyx_k__46[] = ":";
static const char __pyx_k__47[] = ",";
static const char __pyx_k_add[] = "__add__";
static const char __pyx_k_and[] = " and ";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_day[] = "day";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_dts[] = "dts";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_err[] = "err";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_hrs[] = "hrs";
static const char __pyx_k_inc[] = "inc";
static const char __pyx_k_min[] = "min";
static const char __pyx_k_mts[] = "mts";
static const char __pyx_k_mul[] = "__mul__";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_BDay[] = "BDay";
static const char __pyx_k_CBMS[] = "CBMS";
static const char __pyx_k_CDay[] = "CDay";
static const char __pyx_k_Hour[] = "Hour";
static const char __pyx_k_LWOM[] = "LWOM";
static const char __pyx_k_Nano[] = "Nano";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_Tick[] = "Tick";
static const char __pyx_k_Week[] = "Week";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_days[] = "days";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_fabs[] = "fabs";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_hour[] = "hour";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_kwds[] = "kwds";
static const char __pyx_k_last[] = "last";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_nano[] = "nano";
static const char __pyx_k_ndim[] = "ndim";
static const char __pyx_k_nint[] = "nint";
static const char __pyx_k_reso[] = "reso";
static const char __pyx_k_roll[] = "roll";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_sign[] = "sign";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_unit[] = "unit";
static const char __pyx_k_view[] = "view";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_week[] = "week";
static const char __pyx_k_year[] = "year";
static const char __pyx_k_09_00[] = "09:00";
static const char __pyx_k_17_00[] = "17:00";
static const char __pyx_k_A_DEC[] = "A-DEC";
static const char __pyx_k_Micro[] = "Micro";
static const char __pyx_k_Milli[] = "Milli";
static const char __pyx_k_Q_DEC[] = "Q-DEC";
static const char __pyx_k_W_SUN[] = "W-SUN";
static const char __pyx_k_apply[] = "_apply";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_cache[] = "_cache";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_delta[] = "delta";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_get_2[] = "__get__";
static const char __pyx_k_hours[] = "hours";
static const char __pyx_k_inc_2[] = "_inc";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_klass[] = "klass";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_modby[] = "modby";
static const char __pyx_k_month[] = "month";
static const char __pyx_k_nanos[] = "nanos";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_other[] = "other";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_stamp[] = "stamp";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_weeks[] = "weeks";
static const char __pyx_k_years[] = "years";
static const char __pyx_k_AS_JAN[] = "AS-JAN";
static const char __pyx_k_BA_DEC[] = "BA-DEC";
static const char __pyx_k_Easter[] = "Easter";
static const char __pyx_k_FY5253[] = "FY5253";
static const char __pyx_k_Minute[] = "Minute";
static const char __pyx_k_Prefix[] = "Prefix ";
static const char __pyx_k_Second[] = "Second";
static const char __pyx_k_anchor[] = "_anchor";
static const char __pyx_k_astype[] = "astype";
static const char __pyx_k_easter[] = "easter";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_minute[] = "minute";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_months[] = "months";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_offset[] = "_offset";
static const char __pyx_k_params[] = "_params";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_prefix[] = "_prefix";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_reso_2[] = "_reso";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_second[] = "second";
static const char __pyx_k_suffix[] = "suffix";
static const char __pyx_k_tm_min[] = "tm_min";
static const char __pyx_k_tolist[] = "tolist";
static const char __pyx_k_tzinfo[] = "tzinfo";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_BAS_JAN[] = "BAS-JAN";
static const char __pyx_k_YearEnd[] = "YearEnd";
static const char __pyx_k_argsort[] = "argsort";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_combine[] = "combine";
static const char __pyx_k_compare[] = "compare";
static const char __pyx_k_compile[] = "compile";
static const char __pyx_k_day_opt[] = "_day_opt";
static const char __pyx_k_dtindex[] = "dtindex";
static const char __pyx_k_forward[] = "forward";
static const char __pyx_k_freqstr[] = "freqstr";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_get_str[] = "get_str";
static const char __pyx_k_isclose[] = "isclose";
static const char __pyx_k_isspace[] = "isspace";
static const char __pyx_k_minutes[] = "minutes";
static const char __pyx_k_ndarray[] = "ndarray";
static const char __pyx_k_nearest[] = "nearest";
static const char __pyx_k_off_str[] = "off_str";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_res_val[] = "res_val";
static const char __pyx_k_seconds[] = "seconds";
static const char __pyx_k_setattr[] = "__setattr__";
static const char __pyx_k_tm_hour[] = "tm_hour";
static const char __pyx_k_truediv[] = "__truediv__";
static const char __pyx_k_weekday[] = "weekday";
static const char __pyx_k_wrapper[] = "wrapper";
static const char __pyx_k_BYearEnd[] = "BYearEnd";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_MonthEnd[] = "MonthEnd";
static const char __pyx_k_backward[] = "backward";
static const char __pyx_k_calendar[] = "calendar";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_holidays[] = "holidays";
static const char __pyx_k_issubset[] = "issubset";
static const char __pyx_k_m_offset[] = "m_offset";
static const char __pyx_k_offset_2[] = "offset";
static const char __pyx_k_offset_3[] = "offset=";
static const char __pyx_k_onOffset[] = "onOffset";
static const char __pyx_k_opattern[] = "opattern";
static const char __pyx_k_operator[] = "operator";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_rollback[] = "rollback";
static const char __pyx_k_rtruediv[] = "__rtruediv__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_strptime[] = "strptime";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_weekmask[] = "weekmask";
static const char __pyx_k_BMonthEnd[] = "BMonthEnd";
static const char __pyx_k_Timedelta[] = "Timedelta";
static const char __pyx_k_Timestamp[] = "Timestamp";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_YearBegin[] = "YearBegin";
static const char __pyx_k_busdaycal[] = "busdaycal";
static const char __pyx_k_day_opt_2[] = "day_opt";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_from_name[] = "_from_name";
static const char __pyx_k_get_weeks[] = "get_weeks";
static const char __pyx_k_is_busday[] = "is_busday";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_nanos_inc[] = "_nanos_inc";
static const char __pyx_k_next_bday[] = "next_bday";
static const char __pyx_k_normalize[] = "normalize";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_rule_code[] = "rule_code";
static const char __pyx_k_td64_unit[] = "_td64_unit";
static const char __pyx_k_undefined[] = "undefined";
static const char __pyx_k_variation[] = "variation";
static const char __pyx_k_BYearBegin[] = "BYearBegin";
static const char __pyx_k_BaseOffset[] = "BaseOffset";
static const char __pyx_k_CBMonthEnd[] = "CBMonthEnd";
static const char __pyx_k_Cannot_add[] = "Cannot add ";
static const char __pyx_k_DateOffset[] = "DateOffset";
static const char __pyx_k_MonthBegin[] = "MonthBegin";
static const char __pyx_k_OffsetMeta[] = "OffsetMeta";
static const char __pyx_k_QuarterEnd[] = "QuarterEnd";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_YearOffset[] = "YearOffset";
static const char __pyx_k_adjust_dst[] = "_adjust_dst";
static const char __pyx_k_astimezone[] = "astimezone";
static const char __pyx_k_attributes[] = "_attributes";
static const char __pyx_k_cbday_roll[] = "cbday_roll";
static const char __pyx_k_datetime64[] = "datetime64";
static const char __pyx_k_get_offset[] = "_get_offset";
static const char __pyx_k_isAnchored[] = "isAnchored";
static const char __pyx_k_month_roll[] = "month_roll";
static const char __pyx_k_nanosecond[] = "nanosecond";
static const char __pyx_k_offset_map[] = "_offset_map";
static const char __pyx_k_offset_str[] = "_offset_str";
static const char __pyx_k_outputName[] = "_outputName";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_repr_attrs[] = "_repr_attrs";
static const char __pyx_k_stacklevel[] = "stacklevel";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_timedeltas[] = "timedeltas";
static const char __pyx_k_timestamps[] = "timestamps";
static const char __pyx_k_validate_n[] = "_validate_n";
static const char __pyx_k_vectorized[] = "vectorized";
static const char __pyx_k_BMonthBegin[] = "BMonthBegin";
static const char __pyx_k_BQuarterEnd[] = "BQuarterEnd";
static const char __pyx_k_BusinessDay[] = "BusinessDay";
static const char __pyx_k_FY5253Mixin[] = "FY5253Mixin";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_MonthOffset[] = "MonthOffset";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_WeekOfMonth[] = "WeekOfMonth";
static const char __pyx_k_apply_array[] = "_apply_array";
static const char __pyx_k_apply_wraps[] = "apply_wraps";
static const char __pyx_k_init_custom[] = "_init_custom";
static const char __pyx_k_is_anchored[] = "is_anchored";
static const char __pyx_k_is_year_end[] = "is_year_end";
static const char __pyx_k_microsecond[] = "microsecond";
static const char __pyx_k_millisecond[] = "millisecond";
static const char __pyx_k_nanoseconds[] = "nanoseconds";
static const char __pyx_k_output_name[] = "_output_name";
static const char __pyx_k_roll_qtrday[] = "roll_qtrday";
static const char __pyx_k_rollforward[] = "rollforward";
static const char __pyx_k_shift_month[] = "shift_month";
static const char __pyx_k_timedelta64[] = "timedelta64";
static const char __pyx_k_tz_localize[] = "tz_localize";
static const char __pyx_k_varion_code[] = "varion_code";
static const char __pyx_k_BusinessHour[] = "BusinessHour";
static const char __pyx_k_CBMonthBegin[] = "CBMonthBegin";
static const char __pyx_k_QuarterBegin[] = "QuarterBegin";
static const char __pyx_k_SemiMonthEnd[] = "SemiMonthEnd";
static const char __pyx_k_business_end[] = "business_end";
static const char __pyx_k_datetime64_D[] = "datetime64[D]";
static const char __pyx_k_day_of_month[] = "day_of_month";
static const char __pyx_k_deprecations[] = "_deprecations";
static const char __pyx_k_get_year_end[] = "get_year_end";
static const char __pyx_k_is_month_end[] = "is_month_end";
static const char __pyx_k_is_on_offset[] = "is_on_offset";
static const char __pyx_k_microseconds[] = "microseconds";
static const char __pyx_k_milliseconds[] = "milliseconds";
static const char __pyx_k_months_since[] = "months_since";
static const char __pyx_k_parse_suffix[] = "_parse_suffix";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_shift_months[] = "shift_months";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_weekday_code[] = "weekday_code";
static const char __pyx_k_BQuarterBegin[] = "BQuarterBegin";
static const char __pyx_k_BusinessMixin[] = "BusinessMixin";
static const char __pyx_k_FY5253Quarter[] = "FY5253Quarter";
static const char __pyx_k_FutureWarning[] = "FutureWarning";
static const char __pyx_k_MONTH_ALIASES[] = "MONTH_ALIASES";
static const char __pyx_k_N_cannot_be_0[] = "N cannot be 0";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_QuarterOffset[] = "QuarterOffset";
static const char __pyx_k_busday_offset[] = "busday_offset";
static const char __pyx_k_days_in_month[] = "days_in_month";
static const char __pyx_k_default_month[] = "_default_month";
static const char __pyx_k_delta_to_tick[] = "delta_to_tick";
static const char __pyx_k_instancecheck[] = "__instancecheck__";
static const char __pyx_k_is_year_start[] = "is_year_start";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_relativedelta[] = "relativedelta";
static const char __pyx_k_startingMonth[] = "startingMonth";
static const char __pyx_k_subclasscheck[] = "__subclasscheck__";
static const char __pyx_k_to_pydatetime[] = "to_pydatetime";
static const char __pyx_k_total_seconds[] = "total_seconds";
static const char __pyx_k_will_overflow[] = " will overflow";
static const char __pyx_k_ApplyTypeError[] = "ApplyTypeError";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_NotImplemented[] = "NotImplemented";
static const char __pyx_k_SemiMonthBegin[] = "SemiMonthBegin";
static const char __pyx_k_Unhandled_type[] = "Unhandled type: ";
static const char __pyx_k_array_priority[] = "__array_priority__";
static const char __pyx_k_busdaycalendar[] = "busdaycalendar";
static const char __pyx_k_business_start[] = "business_start";
static const char __pyx_k_cache_readonly[] = "cache_readonly";
static const char __pyx_k_dont_uppercase[] = "_dont_uppercase";
static const char __pyx_k_get_offset_day[] = "_get_offset_day";
static const char __pyx_k_int_to_weekday[] = "int_to_weekday";
static const char __pyx_k_is_month_start[] = "is_month_start";
static const char __pyx_k_is_on_offset_2[] = "_is_on_offset";
static const char __pyx_k_is_quarter_end[] = "is_quarter_end";
static const char __pyx_k_months_to_roll[] = "months_to_roll";
static const char __pyx_k_prefix_mapping[] = "prefix_mapping";
static const char __pyx_k_to_pytimedelta[] = "to_pytimedelta";
static const char __pyx_k_weekday_to_int[] = "weekday_to_int";
static const char __pyx_k_Bad_freq_suffix[] = "Bad freq suffix ";
static const char __pyx_k_BusinessYearEnd[] = "BusinessYearEnd";
static const char __pyx_k_LastWeekOfMonth[] = "LastWeekOfMonth";
static const char __pyx_k_SemiMonthOffset[] = "SemiMonthOffset";
static const char __pyx_k_dateutil_easter[] = "dateutil.easter";
static const char __pyx_k_lite_rule_alias[] = "_lite_rule_alias";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_BusinessMonthEnd[] = "BusinessMonthEnd";
static const char __pyx_k_MONTH_TO_CAL_NUM[] = "MONTH_TO_CAL_NUM";
static const char __pyx_k_WeekOfMonthMixin[] = "WeekOfMonthMixin";
static const char __pyx_k_find_stack_level[] = "find_stack_level";
static const char __pyx_k_get_closing_time[] = "_get_closing_time";
static const char __pyx_k_is_quarter_start[] = "is_quarter_start";
static const char __pyx_k_min_day_of_month[] = "_min_day_of_month";
static const char __pyx_k_rollback_to_year[] = "_rollback_to_year";
static const char __pyx_k_BusinessYearBegin[] = "BusinessYearBegin";
static const char __pyx_k_CustomBusinessDay[] = "CustomBusinessDay";
static const char __pyx_k_apply_array_wraps[] = "apply_array_wraps";
static const char __pyx_k_get_suffix_prefix[] = "_get_suffix_prefix";
static const char __pyx_k_next_opening_time[] = "_next_opening_time";
static const char __pyx_k_period_dtype_code[] = "_period_dtype_code";
static const char __pyx_k_prev_opening_time[] = "_prev_opening_time";
static const char __pyx_k_requires_a_suffix[] = " requires a suffix.";
static const char __pyx_k_use_relativedelta[] = "_use_relativedelta";
static const char __pyx_k_BusinessMonthBegin[] = "BusinessMonthBegin";
static const char __pyx_k_BusinessQuarterEnd[] = "BusinessQuarterEnd";
static const char __pyx_k_CustomBusinessHour[] = "CustomBusinessHour";
static const char __pyx_k_Prefix_not_defined[] = "Prefix not defined";
static const char __pyx_k_apply_wrapper_core[] = "apply_wrapper_core";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_relativedelta_kwds[] = "_relativedelta_kwds";
static const char __pyx_k_startingMonth_code[] = "startingMonth_code";
static const char __pyx_k_CustomBusinessMonth[] = "_CustomBusinessMonth";
static const char __pyx_k_DateOffset_subclass[] = "DateOffset subclass ";
static const char __pyx_k_Invalid_frequency_0[] = "Invalid frequency: {0}";
static const char __pyx_k_Mon_Tue_Wed_Thu_Fri[] = "Mon Tue Wed Thu Fri";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_RelativeDeltaOffset[] = "RelativeDeltaOffset";
static const char __pyx_k_day_of_month_27_got[] = "<=day_of_month<=27, got ";
static const char __pyx_k_qtr_with_extra_week[] = "qtr_with_extra_week";
static const char __pyx_k_to_offset_line_3889[] = "to_offset (line 3889)";
static const char __pyx_k_year_has_extra_week[] = "year_has_extra_week";
static const char __pyx_k_BusinessQuarterBegin[] = "BusinessQuarterBegin";
static const char __pyx_k_DateOffset___setattr[] = "DateOffset.__setattr__";
static const char __pyx_k_INVALID_FREQ_ERR_MSG[] = "INVALID_FREQ_ERR_MSG";
static const char __pyx_k_apply_locals_genexpr[] = "_apply.<locals>.genexpr";
static const char __pyx_k_day_of_month_must_be[] = "day_of_month must be ";
static const char __pyx_k_default_day_of_month[] = "_default_day_of_month";
static const char __pyx_k_get_rule_code_suffix[] = "get_rule_code_suffix";
static const char __pyx_k_CustomBusinessMonthEnd[] = "CustomBusinessMonthEnd";
static const char __pyx_k_Unexpected_key__offset[] = "Unexpected key `_offset`";
static const char __pyx_k_d_d_d_s_A_Za_z_dA_Za_z[] = "([+\\-]?\\d*|[+\\-]?\\d*\\.\\d*)\\s*([A-Za-z]+([\\-][\\dA-Za-z\\-]+)?)";
static const char __pyx_k_dateutil_relativedelta[] = "dateutil.relativedelta";
static const char __pyx_k_default_starting_month[] = "_default_starting_month";
static const char __pyx_k_next_higher_resolution[] = "_next_higher_resolution";
static const char __pyx_k_Day_must_be_0_day_6_got[] = "Day must be 0<=day<=6, got ";
static const char __pyx_k_SingleConstructorOffset[] = "SingleConstructorOffset";
static const char __pyx_k_normalize_i8_timestamps[] = "normalize_i8_timestamps";
static const char __pyx_k_pandas__libs_properties[] = "pandas._libs.properties";
static const char __pyx_k_pandas_util__exceptions[] = "pandas.util._exceptions";
static const char __pyx_k_pyx_unpickle_BaseOffset[] = "__pyx_unpickle_BaseOffset";
static const char __pyx_k_reduce___locals_genexpr[] = "__reduce__.<locals>.genexpr";
static const char __pyx_k_BaseOffset_copy_line_538[] = "BaseOffset.copy (line 538)";
static const char __pyx_k_CustomBusinessMonthBegin[] = "CustomBusinessMonthBegin";
static const char __pyx_k_from_name_starting_month[] = "_from_name_starting_month";
static const char __pyx_k_is_a_non_fixed_frequency[] = " is a non-fixed frequency";
static const char __pyx_k_is_not_a_valid_variation[] = " is not a valid variation";
static const char __pyx_k_pass_as_a_string_instead[] = ", pass as a string instead";
static const char __pyx_k_separator_must_be_spaces[] = "separator must be spaces";
static const char __pyx_k_Week_must_be_0_week_3_got[] = "Week must be 0<=week<=3, got ";
static const char __pyx_k_get_business_hours_by_sec[] = "_get_business_hours_by_sec";
static const char __pyx_k_offset_str_locals_get_str[] = "_offset_str.<locals>.get_str";
static const char __pyx_k_repr_attrs_locals_genexpr[] = "_repr_attrs.<locals>.genexpr";
static const char __pyx_k_the_add_operation_between[] = "the add operation between ";
static const char __pyx_k_Month_must_go_from_1_to_12[] = "Month must go from 1 to 12";
static const char __pyx_k_OffsetMeta___instancecheck[] = "OffsetMeta.__instancecheck__";
static const char __pyx_k_OffsetMeta___subclasscheck[] = "OffsetMeta.__subclasscheck__";
static const char __pyx_k_apply_wraps_locals_wrapper[] = "apply_wraps.<locals>.wrapper";
static const char __pyx_k_last_element_must_be_blank[] = "last element must be blank";
static const char __pyx_k_BaseOffset_freqstr_line_614[] = "BaseOffset.freqstr (line 614)";
static const char __pyx_k_Unable_to_parse_varion_code[] = "Unable to parse varion_code: ";
static const char __pyx_k_pandas__libs_tslibs_offsets[] = "pandas._libs.tslibs.offsets";
static const char __pyx_k_Tick_nanos___get___line_1001[] = "Tick.nanos.__get__ (line 1001)";
static const char __pyx_k_pandas__libs_tslibs_ccalendar[] = "pandas._libs.tslibs.ccalendar";
static const char __pyx_k_Return_a_copy_of_the_frequency[] = "\n        Return a copy of the frequency.\n\n        Examples\n        --------\n        >>> freq = pd.DateOffset(1)\n        >>> freq_copy = freq.copy()\n        >>> freq is freq_copy\n        False\n        ";
static const char __pyx_k_Return_an_integer_of_the_total[] = "\n        Return an integer of the total number of nanoseconds.\n\n        Raises\n        ------\n        ValueError\n            If the frequency is non-fixed.\n\n        Examples\n        --------\n        >>> pd.offsets.Hour(5).nanos\n        18000000000000\n        ";
static const char __pyx_k_pyx_unpickle_RelativeDeltaOffs[] = "__pyx_unpickle_RelativeDeltaOffset";
static const char __pyx_k_BaseOffset_is_anchored_line_837[] = "BaseOffset.is_anchored (line 837)";
static const char __pyx_k_BaseOffset_is_year_end_line_919[] = "BaseOffset.is_year_end (line 919)";
static const char __pyx_k_Metaclass_that_allows_us_to_pre[] = "\n    Metaclass that allows us to pretend that all BaseOffset subclasses\n    inherit from DateOffset (which is needed for backward-compatibility).\n    ";
static const char __pyx_k_Offset_apply_index_other_is_dep[] = "'Offset.apply_index(other)' is deprecated. Use 'offset + other' instead.";
static const char __pyx_k_Return_DateOffset_object_from_s[] = "\n    Return DateOffset object from string or datetime.timedelta object.\n\n    Parameters\n    ----------\n    freq : str, datetime.timedelta, BaseOffset or None\n\n    Returns\n    -------\n    DateOffset or None\n\n    Raises\n    ------\n    ValueError\n        If freq is an invalid frequency\n\n    See Also\n    --------\n    BaseOffset : Standard kind of date increment used for a date range.\n\n    Examples\n    --------\n    >>> to_offset(\"5min\")\n    <5 * Minutes>\n\n    >>> to_offset(\"1D1H\")\n    <25 * Hours>\n\n    >>> to_offset(\"2W\")\n    <2 * Weeks: weekday=6>\n\n    >>> to_offset(\"2B\")\n    <2 * BusinessDays>\n\n    >>> to_offset(pd.Timedelta(days=1))\n    <Day>\n\n    >>> to_offset(Hour())\n    <Hour>\n    ";
static const char __pyx_k_Return_a_dict_of_extra_paramete[] = "\n        Return a dict of extra parameters for the offset.\n\n        Examples\n        --------\n        >>> pd.DateOffset(5).kwds\n        {}\n\n        >>> pd.offsets.FY5253Quarter().kwds\n        {'weekday': 0,\n         'startingMonth': 1,\n         'qtr_with_extra_week': 1,\n         'variation': 'nearest'}\n        ";
static const char __pyx_k_Return_a_string_representing_th[] = "\n        Return a string representing the base frequency.\n\n        Examples\n        --------\n        >>> pd.offsets.Hour().name\n        'H'\n\n        >>> pd.offsets.Hour(5).name\n        'H'\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest[] = "\n        Return boolean whether a timestamp intersects with this frequency.\n\n        Parameters\n        ----------\n        dt : datetime.datetime\n            Timestamp to check intersections with frequency.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Day(1)\n        >>> freq.is_on_offset(ts)\n        True\n\n        >>> ts = pd.Timestamp(2022, 8, 6)\n        >>> ts.day_name()\n        'Saturday'\n        >>> freq = pd.offsets.BusinessDay(1)\n        >>> freq.is_on_offset(ts)\n        False\n        ";
static const char __pyx_k_Return_boolean_whether_the_freq[] = "\n        Return boolean whether the frequency is a unit frequency (n=1).\n\n        Examples\n        --------\n        >>> pd.DateOffset().is_anchored()\n        True\n        >>> pd.DateOffset(2).is_anchored()\n        False\n        ";
static const char __pyx_k_Standard_kind_of_date_increment[] = "\n    Standard kind of date increment used for a date range.\n\n    Works exactly like the keyword argument form of relativedelta.\n    Note that the positional argument form of relativedelata is not\n    supported. Use of the keyword n is discouraged-- you would be better\n    off specifying n in the keywords you use, but regardless it is\n    there for you. n is needed for DateOffset subclasses.\n\n    DateOffset works as follows.  Each offset specify a set of dates\n    that conform to the DateOffset.  For example, Bday defines this\n    set to be the set of dates that are weekdays (M-F).  To test if a\n    date is in the set of a DateOffset dateOffset we can use the\n    is_on_offset method: dateOffset.is_on_offset(date).\n\n    If a date is not on a valid date, the rollback and rollforward\n    methods can be used to roll the date to the nearest valid date\n    before/after the date.\n\n    DateOffsets can be created to move dates forward a given number of\n    valid dates.  For example, Bday(2) can be added to a date to move\n    it two business days forward.  If the date does not start on a\n    valid date, first it is moved to a valid date.  Thus pseudo code\n    is:\n\n    def __add__(date):\n      date = rollback(date) # does nothing if date is valid\n      return date + <n number of periods>\n\n    When a date offset is created for a negative number of periods,\n    the date is first rolled forward.  The pseudo code is:\n\n    def __add__(date):\n      date = rollforward(date) # does nothing is date is valid\n      return date + <n number of periods>\n\n    Zero presents a problem.  Should it roll forward or back?  We\n    arbitrarily have it rollforward:\n\n    date + BDay(0) == BDay.rollforward(date)\n\n    Since 0 is a bit weird, we suggest avoiding its use.\n\n    Besides, adding a DateOffsets specified by the singular form of the date\n    component can be used to replace certain component of the timestamp.\n\n    Parameters\n    ----------\n    n : ""int, default 1\n        The number of time periods the offset represents.\n        If specified without a temporal pattern, defaults to n days.\n    normalize : bool, default False\n        Whether to round the result of a DateOffset addition down to the\n        previous midnight.\n    **kwds\n        Temporal parameter that add to or replace the offset value.\n\n        Parameters that **add** to the offset (like Timedelta):\n\n        - years\n        - months\n        - weeks\n        - days\n        - hours\n        - minutes\n        - seconds\n        - milliseconds\n        - microseconds\n        - nanoseconds\n\n        Parameters that **replace** the offset value:\n\n        - year\n        - month\n        - day\n        - weekday\n        - hour\n        - minute\n        - second\n        - microsecond\n        - nanosecond.\n\n    See Also\n    --------\n    dateutil.relativedelta.relativedelta : The relativedelta type is designed\n        to be applied to an existing datetime an can replace specific components of\n        that datetime, or represents an interval of time.\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import DateOffset\n    >>> ts = pd.Timestamp('2017-01-01 09:10:11')\n    >>> ts + DateOffset(months=3)\n    Timestamp('2017-04-01 09:10:11')\n\n    >>> ts = pd.Timestamp('2017-01-01 09:10:11')\n    >>> ts + DateOffset(months=2)\n    Timestamp('2017-03-01 09:10:11')\n    >>> ts + DateOffset(day=31)\n    Timestamp('2017-01-31 09:10:11')\n\n    >>> ts + pd.DateOffset(hour=8)\n    Timestamp('2017-01-01 08:10:11')\n    ";
static const char __pyx_k_Tick_offset_with_normalize_True[] = "Tick offset with `normalize=True` are not allowed.";
static const char __pyx_k_apply_is_deprecated_and_will_be[] = ".apply is deprecated and will be removed in a future version. Use `offset + other` instead";
static const char __pyx_k_determine_offset_locals_genexpr[] = "_determine_offset.<locals>.genexpr";
static const char __pyx_k_does_not_have_a_vectorized_impl[] = " does not have a vectorized implementation";
static const char __pyx_k_n_argument_must_be_an_integer_g[] = "`n` argument must be an integer, got ";
static const char __pyx_k_not_able_to_be_applied_vectoriz[] = " not able to be applied vectorized";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_onOffset_is_a_deprecated_use_is[] = "onOffset is a deprecated, use is_on_offset instead.";
static const char __pyx_k_pandas__libs_tslibs_offsets_pyx[] = "pandas/_libs/tslibs/offsets.pyx";
static const char __pyx_k_time_data_must_match_H_M_format[] = "time data must match '%H:%M' format";
static const char __pyx_k_BaseOffset_is_month_end_line_867[] = "BaseOffset.is_month_end (line 867)";
static const char __pyx_k_BaseOffset_is_month_start_line_8[] = "BaseOffset.is_month_start (line 854)";
static const char __pyx_k_BaseOffset_is_on_offset_line_727[] = "BaseOffset.is_on_offset (line 727)";
static const char __pyx_k_BaseOffset_is_quarter_end_line_8[] = "BaseOffset.is_quarter_end (line 893)";
static const char __pyx_k_BaseOffset_is_quarter_start_line[] = "BaseOffset.is_quarter_start (line 880)";
static const char __pyx_k_BaseOffset_is_year_start_line_90[] = "BaseOffset.is_year_start (line 906)";
static const char __pyx_k_BaseOffset_kwds___get___line_437[] = "BaseOffset.kwds.__get__ (line 437)";
static const char __pyx_k_BaseOffset_name___get___line_591[] = "BaseOffset.name.__get__ (line 591)";
static const char __pyx_k_Cannot_subtract_datetime_from_of[] = "Cannot subtract datetime from offset.";
static const char __pyx_k_Could_not_convert_to_integer_off[] = "Could not convert to integer offset at any resolution";
static const char __pyx_k_DateOffset___call___is_deprecate[] = "DateOffset.__call__ is deprecated and will be removed in a future version.  Use `offset + other` instead.";
static const char __pyx_k_DateOffset_objects_are_immutable[] = "DateOffset objects are immutable.";
static const char __pyx_k_DateOffset_with_relativedelta_ke[] = "DateOffset with relativedelta keyword(s) ";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))";
static const char __pyx_k_Must_include_at_least_1_end_time[] = "Must include at least 1 end time";
static const char __pyx_k_Must_include_at_least_1_start_ti[] = "Must include at least 1 start time";
static const char __pyx_k_Only_know_how_to_combine_busines[] = "Only know how to combine business day with datetime or timedelta.";
static const char __pyx_k_Only_know_how_to_combine_trading[] = "Only know how to combine trading day with datetime, datetime64 or timedelta.";
static const char __pyx_k_Using_DateOffset_to_replace_mill[] = "Using DateOffset to replace `millisecond` component in datetime object is not supported. Use `microsecond=timestamp.microsecond % 1000 + ms * 1000` instead.";
static const char __pyx_k_apply_array_wraps_locals_wrapper[] = "apply_array_wraps.<locals>.wrapper";
static const char __pyx_k_day_must_be_None_start_end_busin[] = "day must be None, 'start', 'end', 'business_start', or 'business_end'";
static const char __pyx_k_invalid_starting_and_ending_time[] = "invalid starting and ending time(s): opening hours should not touch or overlap with one another";
static const char __pyx_k_isAnchored_is_a_deprecated_use_i[] = "isAnchored is a deprecated, use is_anchored instead.";
static const char __pyx_k_number_of_starting_time_and_endi[] = "number of starting time and ending time must be the same";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_time_data_must_be_specified_only[] = "time data must be specified only with hour and minute";
static const char __pyx_k_time_data_must_be_string_or_date[] = "time data must be string or datetime.time";
static const char __pyx_k_to_offset_does_not_support_tuple[] = "to_offset does not support tuples ";
static const char __pyx_k_Return_a_string_representing_th_2[] = "\n        Return a string representing the frequency.\n\n        Examples\n        --------\n        >>> pd.DateOffset(5).freqstr\n        '<5 * DateOffsets>'\n\n        >>> pd.offsets.BusinessHour(2).freqstr\n        '2BH'\n\n        >>> pd.offsets.Nano().freqstr\n        'N'\n\n        >>> pd.offsets.Nano(-3).freqstr\n        '-3N'\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest_2[] = "\n        Return boolean whether a timestamp occurs on the month start.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_month_start(ts)\n        True\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest_3[] = "\n        Return boolean whether a timestamp occurs on the month end.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_month_end(ts)\n        False\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest_4[] = "\n        Return boolean whether a timestamp occurs on the quarter start.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_quarter_start(ts)\n        True\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest_5[] = "\n        Return boolean whether a timestamp occurs on the quarter end.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_quarter_end(ts)\n        False\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest_6[] = "\n        Return boolean whether a timestamp occurs on the year start.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_year_start(ts)\n        True\n        ";
static const char __pyx_k_Return_boolean_whether_a_timest_7[] = "\n        Return boolean whether a timestamp occurs on the year end.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_year_end(ts)\n        False\n        ";
static PyObject *__pyx_kp_u_02d;
static PyObject *__pyx_kp_u_09_00;
static PyObject *__pyx_kp_u_17_00;
static PyObject *__pyx_n_u_A;
static PyObject *__pyx_n_u_AS;
static PyObject *__pyx_kp_u_AS_JAN;
static PyObject *__pyx_kp_u_A_DEC;
static PyObject *__pyx_n_s_ApplyTypeError;
static PyObject *__pyx_n_s_AssertionError;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_u_B;
static PyObject *__pyx_n_u_BA;
static PyObject *__pyx_n_u_BAS;
static PyObject *__pyx_kp_u_BAS_JAN;
static PyObject *__pyx_kp_u_BA_DEC;
static PyObject *__pyx_n_s_BDay;
static PyObject *__pyx_n_u_BH;
static PyObject *__pyx_n_u_BM;
static PyObject *__pyx_n_u_BMS;
static PyObject *__pyx_n_s_BMonthBegin;
static PyObject *__pyx_n_s_BMonthEnd;
static PyObject *__pyx_n_u_BQ;
static PyObject *__pyx_n_u_BQS;
static PyObject *__pyx_n_s_BQuarterBegin;
static PyObject *__pyx_n_s_BQuarterEnd;
static PyObject *__pyx_n_u_BY;
static PyObject *__pyx_n_u_BYS;
static PyObject *__pyx_n_s_BYearBegin;
static PyObject *__pyx_n_s_BYearEnd;
static PyObject *__pyx_kp_u_Bad_freq_suffix;
static PyObject *__pyx_n_s_BaseOffset;
static PyObject *__pyx_kp_u_BaseOffset_copy_line_538;
static PyObject *__pyx_kp_u_BaseOffset_freqstr_line_614;
static PyObject *__pyx_kp_u_BaseOffset_is_anchored_line_837;
static PyObject *__pyx_kp_u_BaseOffset_is_month_end_line_867;
static PyObject *__pyx_kp_u_BaseOffset_is_month_start_line_8;
static PyObject *__pyx_kp_u_BaseOffset_is_on_offset_line_727;
static PyObject *__pyx_kp_u_BaseOffset_is_quarter_end_line_8;
static PyObject *__pyx_kp_u_BaseOffset_is_quarter_start_line;
static PyObject *__pyx_kp_u_BaseOffset_is_year_end_line_919;
static PyObject *__pyx_kp_u_BaseOffset_is_year_start_line_90;
static PyObject *__pyx_kp_u_BaseOffset_kwds___get___line_437;
static PyObject *__pyx_kp_u_BaseOffset_name___get___line_591;
static PyObject *__pyx_n_s_BusinessDay;
static PyObject *__pyx_n_s_BusinessHour;
static PyObject *__pyx_n_s_BusinessMixin;
static PyObject *__pyx_n_s_BusinessMonthBegin;
static PyObject *__pyx_n_s_BusinessMonthEnd;
static PyObject *__pyx_n_u_BusinessQuarterBegin;
static PyObject *__pyx_n_u_BusinessQuarterEnd;
static PyObject *__pyx_n_u_BusinessYearBegin;
static PyObject *__pyx_n_u_BusinessYearEnd;
static PyObject *__pyx_n_u_C;
static PyObject *__pyx_n_u_CBH;
static PyObject *__pyx_n_u_CBM;
static PyObject *__pyx_n_u_CBMS;
static PyObject *__pyx_n_s_CBMonthBegin;
static PyObject *__pyx_n_s_CBMonthEnd;
static PyObject *__pyx_n_s_CDay;
static PyObject *__pyx_kp_u_Cannot_add;
static PyObject *__pyx_kp_u_Cannot_subtract_datetime_from_of;
static PyObject *__pyx_kp_u_Could_not_convert_to_integer_off;
static PyObject *__pyx_n_s_CustomBusinessDay;
static PyObject *__pyx_n_s_CustomBusinessHour;
static PyObject *__pyx_n_s_CustomBusinessMonth;
static PyObject *__pyx_n_s_CustomBusinessMonthBegin;
static PyObject *__pyx_n_s_CustomBusinessMonthEnd;
static PyObject *__pyx_n_u_D;
static PyObject *__pyx_n_s_DateOffset;
static PyObject *__pyx_kp_u_DateOffset___call___is_deprecate;
static PyObject *__pyx_n_s_DateOffset___setattr;
static PyObject *__pyx_kp_u_DateOffset_objects_are_immutable;
static PyObject *__pyx_kp_u_DateOffset_subclass;
static PyObject *__pyx_kp_u_DateOffset_with_relativedelta_ke;
static PyObject *__pyx_n_s_Day;
static PyObject *__pyx_kp_u_Day_must_be_0_day_6_got;
static PyObject *__pyx_n_s_Easter;
static PyObject *__pyx_n_s_FY5253;
static PyObject *__pyx_n_s_FY5253Mixin;
static PyObject *__pyx_n_s_FY5253Quarter;
static PyObject *__pyx_n_s_FutureWarning;
static PyObject *__pyx_n_u_H;
static PyObject *__pyx_kp_u_H_M;
static PyObject *__pyx_n_s_Hour;
static PyObject *__pyx_n_s_INVALID_FREQ_ERR_MSG;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_kp_u_Invalid_frequency_0;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_u_L;
static PyObject *__pyx_n_u_LWOM;
static PyObject *__pyx_n_s_LastWeekOfMonth;
static PyObject *__pyx_n_u_M;
static PyObject *__pyx_n_s_MONTH_ALIASES;
static PyObject *__pyx_n_s_MONTH_TO_CAL_NUM;
static PyObject *__pyx_n_u_MS;
static PyObject *__pyx_kp_s_Metaclass_that_allows_us_to_pre;
static PyObject *__pyx_n_s_Micro;
static PyObject *__pyx_n_s_Milli;
static PyObject *__pyx_n_u_Min;
static PyObject *__pyx_n_s_Minute;
static PyObject *__pyx_kp_u_Mon_Tue_Wed_Thu_Fri;
static PyObject *__pyx_n_s_MonthBegin;
static PyObject *__pyx_n_s_MonthEnd;
static PyObject *__pyx_n_s_MonthOffset;
static PyObject *__pyx_kp_u_Month_must_go_from_1_to_12;
static PyObject *__pyx_kp_u_Must_include_at_least_1_end_time;
static PyObject *__pyx_kp_u_Must_include_at_least_1_start_ti;
static PyObject *__pyx_n_u_N;
static PyObject *__pyx_kp_u_N_cannot_be_0;
static PyObject *__pyx_n_s_Nano;
static PyObject *__pyx_kp_u_None;
static PyObject *__pyx_n_s_NotImplemented;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_OffsetMeta;
static PyObject *__pyx_n_s_OffsetMeta___instancecheck;
static PyObject *__pyx_n_s_OffsetMeta___subclasscheck;
static PyObject *__pyx_kp_u_Offset_apply_index_other_is_dep;
static PyObject *__pyx_kp_u_Only_know_how_to_combine_busines;
static PyObject *__pyx_kp_u_Only_know_how_to_combine_trading;
static PyObject *__pyx_n_s_OverflowError;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_kp_u_Prefix;
static PyObject *__pyx_kp_u_Prefix_not_defined;
static PyObject *__pyx_n_u_Q;
static PyObject *__pyx_n_u_QS;
static PyObject *__pyx_kp_u_Q_DEC;
static PyObject *__pyx_n_s_QuarterBegin;
static PyObject *__pyx_n_s_QuarterEnd;
static PyObject *__pyx_n_s_QuarterOffset;
static PyObject *__pyx_n_u_RE;
static PyObject *__pyx_n_u_REQ;
static PyObject *__pyx_n_s_RelativeDeltaOffset;
static PyObject *__pyx_kp_u_Return_DateOffset_object_from_s;
static PyObject *__pyx_kp_u_Return_a_copy_of_the_frequency;
static PyObject *__pyx_kp_u_Return_a_dict_of_extra_paramete;
static PyObject *__pyx_kp_u_Return_a_string_representing_th;
static PyObject *__pyx_kp_u_Return_a_string_representing_th_2;
static PyObject *__pyx_kp_u_Return_an_integer_of_the_total;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest_2;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest_3;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest_4;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest_5;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest_6;
static PyObject *__pyx_kp_u_Return_boolean_whether_a_timest_7;
static PyObject *__pyx_kp_u_Return_boolean_whether_the_freq;
static PyObject *__pyx_n_u_S;
static PyObject *__pyx_n_u_SM;
static PyObject *__pyx_n_u_SMS;
static PyObject *__pyx_n_s_Second;
static PyObject *__pyx_n_s_SemiMonthBegin;
static PyObject *__pyx_n_s_SemiMonthEnd;
static PyObject *__pyx_n_s_SemiMonthOffset;
static PyObject *__pyx_n_s_SingleConstructorOffset;
static PyObject *__pyx_kp_s_Standard_kind_of_date_increment;
static PyObject *__pyx_n_u_T;
static PyObject *__pyx_n_s_Tick;
static PyObject *__pyx_kp_u_Tick_nanos___get___line_1001;
static PyObject *__pyx_kp_u_Tick_offset_with_normalize_True;
static PyObject *__pyx_n_s_Timedelta;
static PyObject *__pyx_n_s_Timestamp;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_u_U;
static PyObject *__pyx_kp_u_Unable_to_parse_varion_code;
static PyObject *__pyx_kp_u_Unexpected_key__offset;
static PyObject *__pyx_kp_u_Unhandled_type;
static PyObject *__pyx_kp_u_Using_DateOffset_to_replace_mill;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_u_W;
static PyObject *__pyx_n_u_WOM;
static PyObject *__pyx_kp_u_W_SUN;
static PyObject *__pyx_n_s_Week;
static PyObject *__pyx_n_s_WeekOfMonth;
static PyObject *__pyx_n_s_WeekOfMonthMixin;
static PyObject *__pyx_kp_u_Week_must_be_0_week_3_got;
static PyObject *__pyx_n_u_Y;
static PyObject *__pyx_n_u_YS;
static PyObject *__pyx_n_s_YearBegin;
static PyObject *__pyx_n_s_YearEnd;
static PyObject *__pyx_n_s_YearOffset;
static PyObject *__pyx_n_u__11;
static PyObject *__pyx_kp_u__14;
static PyObject *__pyx_kp_u__15;
static PyObject *__pyx_kp_u__16;
static PyObject *__pyx_kp_u__17;
static PyObject *__pyx_kp_u__18;
static PyObject *__pyx_kp_u__19;
static PyObject *__pyx_kp_u__20;
static PyObject *__pyx_kp_u__38;
static PyObject *__pyx_kp_u__39;
static PyObject *__pyx_kp_u__46;
static PyObject *__pyx_kp_u__47;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_s_adjust_dst;
static PyObject *__pyx_n_s_anchor;
static PyObject *__pyx_kp_u_and;
static PyObject *__pyx_n_s_apply;
static PyObject *__pyx_n_s_apply_array;
static PyObject *__pyx_n_s_apply_array_wraps;
static PyObject *__pyx_n_s_apply_array_wraps_locals_wrapper;
static PyObject *__pyx_kp_u_apply_is_deprecated_and_will_be;
static PyObject *__pyx_n_s_apply_locals_genexpr;
static PyObject *__pyx_n_s_apply_wrapper_core;
static PyObject *__pyx_n_s_apply_wraps;
static PyObject *__pyx_n_s_apply_wraps_locals_wrapper;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_argsort;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_array_priority;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_astimezone;
static PyObject *__pyx_n_s_astype;
static PyObject *__pyx_n_s_attributes;
static PyObject *__pyx_n_u_backward;
static PyObject *__pyx_n_s_busday_offset;
static PyObject *__pyx_n_s_busdaycal;
static PyObject *__pyx_n_s_busdaycalendar;
static PyObject *__pyx_n_u_business_end;
static PyObject *__pyx_n_u_business_start;
static PyObject *__pyx_n_u_cache;
static PyObject *__pyx_n_s_cache_readonly;
static PyObject *__pyx_n_s_calendar;
static PyObject *__pyx_n_u_calendar;
static PyObject *__pyx_n_s_cbday_roll;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_combine;
static PyObject *__pyx_n_s_compare;
static PyObject *__pyx_n_s_compile;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_kp_u_d_d_d_s_A_Za_z_dA_Za_z;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_datetime64;
static PyObject *__pyx_kp_u_datetime64_D;
static PyObject *__pyx_n_s_dateutil_easter;
static PyObject *__pyx_n_s_dateutil_relativedelta;
static PyObject *__pyx_n_s_day;
static PyObject *__pyx_n_u_day;
static PyObject *__pyx_kp_u_day_must_be_None_start_end_busin;
static PyObject *__pyx_n_s_day_of_month;
static PyObject *__pyx_n_u_day_of_month;
static PyObject *__pyx_kp_u_day_of_month_27_got;
static PyObject *__pyx_kp_u_day_of_month_must_be;
static PyObject *__pyx_n_s_day_opt;
static PyObject *__pyx_n_s_day_opt_2;
static PyObject *__pyx_n_s_days;
static PyObject *__pyx_n_u_days;
static PyObject *__pyx_n_s_days_in_month;
static PyObject *__pyx_n_s_default_day_of_month;
static PyObject *__pyx_n_s_default_month;
static PyObject *__pyx_n_s_default_starting_month;
static PyObject *__pyx_n_s_delta;
static PyObject *__pyx_n_s_delta_to_tick;
static PyObject *__pyx_n_s_deprecations;
static PyObject *__pyx_n_s_determine_offset_locals_genexpr;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_u_dict;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_kp_u_does_not_have_a_vectorized_impl;
static PyObject *__pyx_n_s_dont_uppercase;
static PyObject *__pyx_n_s_dtindex;
static PyObject *__pyx_n_s_dts;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dy;
static PyObject *__pyx_n_s_easter;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_u_end;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_err;
static PyObject *__pyx_n_s_fabs;
static PyObject *__pyx_n_s_find_stack_level;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_u_forward;
static PyObject *__pyx_n_s_freqstr;
static PyObject *__pyx_n_s_from_name;
static PyObject *__pyx_n_s_from_name_starting_month;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_ge;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_2;
static PyObject *__pyx_n_s_get_business_hours_by_sec;
static PyObject *__pyx_n_s_get_closing_time;
static PyObject *__pyx_n_s_get_offset;
static PyObject *__pyx_n_s_get_offset_day;
static PyObject *__pyx_n_s_get_rule_code_suffix;
static PyObject *__pyx_n_s_get_str;
static PyObject *__pyx_n_s_get_suffix_prefix;
static PyObject *__pyx_n_s_get_weeks;
static PyObject *__pyx_n_s_get_year_end;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_gt;
static PyObject *__pyx_n_u_h;
static PyObject *__pyx_n_s_holidays;
static PyObject *__pyx_n_u_holidays;
static PyObject *__pyx_n_s_hour;
static PyObject *__pyx_n_u_hour;
static PyObject *__pyx_n_u_hours;
static PyObject *__pyx_n_s_hrs;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_u_i8;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_u_inc;
static PyObject *__pyx_n_s_inc_2;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init_custom;
static PyObject *__pyx_n_s_instancecheck;
static PyObject *__pyx_n_s_int_to_weekday;
static PyObject *__pyx_kp_u_invalid_starting_and_ending_time;
static PyObject *__pyx_n_u_isAnchored;
static PyObject *__pyx_kp_u_isAnchored_is_a_deprecated_use_i;
static PyObject *__pyx_kp_u_is_a_non_fixed_frequency;
static PyObject *__pyx_n_s_is_anchored;
static PyObject *__pyx_n_s_is_busday;
static PyObject *__pyx_n_u_is_month_end;
static PyObject *__pyx_n_u_is_month_start;
static PyObject *__pyx_kp_u_is_not_a_valid_variation;
static PyObject *__pyx_n_s_is_on_offset;
static PyObject *__pyx_n_s_is_on_offset_2;
static PyObject *__pyx_n_u_is_quarter_end;
static PyObject *__pyx_n_u_is_quarter_start;
static PyObject *__pyx_n_u_is_year_end;
static PyObject *__pyx_n_u_is_year_start;
static PyObject *__pyx_n_s_isclose;
static PyObject *__pyx_n_s_isspace;
static PyObject *__pyx_n_s_issubset;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_klass;
static PyObject *__pyx_n_s_kwds;
static PyObject *__pyx_n_u_kwds;
static PyObject *__pyx_n_u_last;
static PyObject *__pyx_kp_u_last_element_must_be_blank;
static PyObject *__pyx_n_s_le;
static PyObject *__pyx_n_s_lite_rule_alias;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_lt;
static PyObject *__pyx_n_u_m;
static PyObject *__pyx_n_s_m_offset;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_mi;
static PyObject *__pyx_n_s_microsecond;
static PyObject *__pyx_n_u_microsecond;
static PyObject *__pyx_n_s_microseconds;
static PyObject *__pyx_n_u_microseconds;
static PyObject *__pyx_n_u_millisecond;
static PyObject *__pyx_n_u_milliseconds;
static PyObject *__pyx_n_u_min;
static PyObject *__pyx_n_s_min_day_of_month;
static PyObject *__pyx_n_s_minute;
static PyObject *__pyx_n_u_minute;
static PyObject *__pyx_n_s_minutes;
static PyObject *__pyx_n_u_minutes;
static PyObject *__pyx_n_s_modby;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_month;
static PyObject *__pyx_n_u_month;
static PyObject *__pyx_n_s_month_roll;
static PyObject *__pyx_n_s_months;
static PyObject *__pyx_n_u_months;
static PyObject *__pyx_n_s_months_since;
static PyObject *__pyx_n_s_months_to_roll;
static PyObject *__pyx_n_u_ms;
static PyObject *__pyx_n_s_mts;
static PyObject *__pyx_n_s_mul;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_u_n;
static PyObject *__pyx_kp_u_n_argument_must_be_an_integer_g;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_u_name_2;
static PyObject *__pyx_n_s_nano;
static PyObject *__pyx_n_s_nanos;
static PyObject *__pyx_n_s_nanos_inc;
static PyObject *__pyx_n_s_nanosecond;
static PyObject *__pyx_n_u_nanosecond;
static PyObject *__pyx_n_s_nanoseconds;
static PyObject *__pyx_n_u_nanoseconds;
static PyObject *__pyx_n_s_ndarray;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_n_u_nearest;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_next_bday;
static PyObject *__pyx_n_u_next_bday;
static PyObject *__pyx_n_s_next_higher_resolution;
static PyObject *__pyx_n_s_next_opening_time;
static PyObject *__pyx_n_s_nint;
static PyObject *__pyx_n_s_normalize;
static PyObject *__pyx_n_u_normalize;
static PyObject *__pyx_n_s_normalize_i8_timestamps;
static PyObject *__pyx_kp_u_not_able_to_be_applied_vectoriz;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_u_ns;
static PyObject *__pyx_kp_u_number_of_starting_time_and_endi;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_off_str;
static PyObject *__pyx_n_s_offset;
static PyObject *__pyx_n_u_offset;
static PyObject *__pyx_n_s_offset_2;
static PyObject *__pyx_n_u_offset_2;
static PyObject *__pyx_kp_u_offset_3;
static PyObject *__pyx_n_s_offset_map;
static PyObject *__pyx_n_s_offset_str;
static PyObject *__pyx_n_s_offset_str_locals_get_str;
static PyObject *__pyx_n_u_onOffset;
static PyObject *__pyx_kp_u_onOffset_is_a_deprecated_use_is;
static PyObject *__pyx_n_s_opattern;
static PyObject *__pyx_n_s_operator;
static PyObject *__pyx_n_s_other;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_outputName;
static PyObject *__pyx_n_s_output_name;
static PyObject *__pyx_n_u_output_name;
static PyObject *__pyx_n_s_pandas__libs_properties;
static PyObject *__pyx_n_s_pandas__libs_tslibs_ccalendar;
static PyObject *__pyx_n_s_pandas__libs_tslibs_offsets;
static PyObject *__pyx_kp_s_pandas__libs_tslibs_offsets_pyx;
static PyObject *__pyx_n_s_pandas_util__exceptions;
static PyObject *__pyx_n_s_params;
static PyObject *__pyx_n_s_parse_suffix;
static PyObject *__pyx_kp_u_pass_as_a_string_instead;
static PyObject *__pyx_n_s_period_dtype_code;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_s_prefix_mapping;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_prev_opening_time;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_BaseOffset;
static PyObject *__pyx_n_s_pyx_unpickle_RelativeDeltaOffs;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qtr_with_extra_week;
static PyObject *__pyx_n_u_qtr_with_extra_week;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_re;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce___locals_genexpr;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_relativedelta;
static PyObject *__pyx_n_s_relativedelta_kwds;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_repr_attrs;
static PyObject *__pyx_n_s_repr_attrs_locals_genexpr;
static PyObject *__pyx_kp_u_requires_a_suffix;
static PyObject *__pyx_n_s_res_val;
static PyObject *__pyx_n_s_reso;
static PyObject *__pyx_n_s_reso_2;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_n_s_reversed;
static PyObject *__pyx_n_s_roll;
static PyObject *__pyx_n_s_roll_qtrday;
static PyObject *__pyx_n_s_rollback;
static PyObject *__pyx_n_s_rollback_to_year;
static PyObject *__pyx_n_s_rollforward;
static PyObject *__pyx_n_s_rtruediv;
static PyObject *__pyx_n_s_rule_code;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_u_s;
static PyObject *__pyx_n_s_second;
static PyObject *__pyx_n_u_second;
static PyObject *__pyx_n_s_seconds;
static PyObject *__pyx_n_u_seconds;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_kp_u_separator_must_be_spaces;
static PyObject *__pyx_n_s_setattr;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shift_month;
static PyObject *__pyx_n_s_shift_months;
static PyObject *__pyx_n_s_sign;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_stacklevel;
static PyObject *__pyx_n_s_stamp;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_u_start;
static PyObject *__pyx_n_s_startingMonth;
static PyObject *__pyx_n_u_startingMonth;
static PyObject *__pyx_n_s_startingMonth_code;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_strptime;
static PyObject *__pyx_n_s_subclasscheck;
static PyObject *__pyx_n_s_suffix;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_td;
static PyObject *__pyx_n_s_td64_unit;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_u_the_add_operation_between;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_kp_u_time_data_must_be_specified_only;
static PyObject *__pyx_kp_u_time_data_must_be_string_or_date;
static PyObject *__pyx_kp_u_time_data_must_match_H_M_format;
static PyObject *__pyx_n_s_timedelta64;
static PyObject *__pyx_n_s_timedeltas;
static PyObject *__pyx_n_s_timestamps;
static PyObject *__pyx_n_s_tm_hour;
static PyObject *__pyx_n_s_tm_min;
static PyObject *__pyx_kp_u_to;
static PyObject *__pyx_kp_u_to_offset_does_not_support_tuple;
static PyObject *__pyx_kp_u_to_offset_line_3889;
static PyObject *__pyx_n_s_to_pydatetime;
static PyObject *__pyx_n_s_to_pytimedelta;
static PyObject *__pyx_n_s_tolist;
static PyObject *__pyx_n_s_total_seconds;
static PyObject *__pyx_n_s_truediv;
static PyObject *__pyx_n_s_tz;
static PyObject *__pyx_n_s_tz_localize;
static PyObject *__pyx_n_s_tzinfo;
static PyObject *__pyx_n_u_tzinfo;
static PyObject *__pyx_n_u_undefined;
static PyObject *__pyx_n_s_unit;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_upper;
static PyObject *__pyx_n_u_us;
static PyObject *__pyx_n_s_use_relativedelta;
static PyObject *__pyx_n_u_use_relativedelta;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_validate_n;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_variation;
static PyObject *__pyx_n_u_variation;
static PyObject *__pyx_n_s_varion_code;
static PyObject *__pyx_n_s_vectorized;
static PyObject *__pyx_n_s_view;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_week;
static PyObject *__pyx_n_u_week;
static PyObject *__pyx_n_s_weekday;
static PyObject *__pyx_n_u_weekday;
static PyObject *__pyx_n_s_weekday_code;
static PyObject *__pyx_n_s_weekday_to_int;
static PyObject *__pyx_n_s_weekmask;
static PyObject *__pyx_n_u_weekmask;
static PyObject *__pyx_n_s_weeks;
static PyObject *__pyx_n_u_weeks;
static PyObject *__pyx_kp_u_will_overflow;
static PyObject *__pyx_n_s_wrapper;
static PyObject *__pyx_n_s_year;
static PyObject *__pyx_n_u_year;
static PyObject *__pyx_n_s_year_has_extra_week;
static PyObject *__pyx_n_u_years;
static PyObject *__pyx_n_s_zip;
static PyArrayObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_apply_wrapper_core(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_2apply_array_wraps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4apply_wraps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_6genexpr(PyObject *__pyx_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_2__eq__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4__ne__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static Py_hash_t __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6__hash__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_8_params(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4kwds___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4base___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_12__radd__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_14__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_16__rsub__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_18__call__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_20apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_22__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_24__rmul__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_26__neg__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_28copy(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_30__repr__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_32_repr_attrs(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4name___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7_prefix___get__(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_34freqstr(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_36_offset_str(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_38apply_index(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dtindex); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_40_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dtarr); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_42rollback(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dt); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_44rollforward(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_46_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_48is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_50_validate_n(PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_52__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_54__getstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5nanos___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_56onOffset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_58isAnchored(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_60is_anchored(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_62is_month_start(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_64is_month_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_66is_quarter_start(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_68is_quarter_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_70is_year_start(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_72is_year_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1n___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9normalize___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6_cache___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_74__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_76__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset__from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_2__reduce__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_2_next_higher_resolution(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_4_repr_attrs(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_5delta___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_5nanos___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_6is_on_offset(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, CYTHON_UNUSED PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_8is_anchored(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_10__hash__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_12__eq__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_14__ne__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_16__le__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_18__lt__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_20__ge__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_22__gt__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_24__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_26__rmul__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_28__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_30__rtruediv__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_32__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_34__radd__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_36_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_38__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6delta_to_tick(CYTHON_UNUSED PyObject *__pyx_self, PyDateTime_Delta *__pyx_v_delta); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_2__getstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_4__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_6_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_8_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_10is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_12__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_14__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta___instancecheck__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_2__subclasscheck__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10DateOffset___setattr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_2_init_custom(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6offset___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_4_repr_attrs(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7_offset___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8weekmask___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8holidays___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8calendar___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_get_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_2_offset_str(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_4_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_6_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_8is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_4_repr_attrs(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_get_business_hours_by_sec(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_8_get_closing_time(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_10next_bday(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_12_next_opening_time(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_sign); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_14_prev_opening_time(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_16rollback(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_18rollforward(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_genexpr(PyObject *__pyx_self); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_20_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_22is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_24_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5start___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3end___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_7weekday___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4week___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_month); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_4_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_6is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_8_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_10_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_12_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5month___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_7YearEnd___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_month); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_7YearEnd_18_period_dtype_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_startingMonth); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_4_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_6is_anchored(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_8is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_10_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_12_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13startingMonth___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_startingMonth); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_18_period_dtype_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_4_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_6__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_day_of_month); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_4_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_6_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_8_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_12day_of_month___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12SemiMonthEnd_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_14SemiMonthBegin_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_4is_anchored(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_6_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_8_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_dtarr); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_10is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_12_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_7weekday___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_18_period_dtype_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_week, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_4_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_6_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_4_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_6_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday, PyObject *__pyx_v_startingMonth, PyObject *__pyx_v_variation); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_4is_anchored(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_6_get_suffix_prefix(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_8get_rule_code_suffix(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_13startingMonth___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7weekday___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9variation___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_4get_year_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_6_parse_suffix(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_varion_code, PyObject *__pyx_v_startingMonth_code, PyObject *__pyx_v_weekday_code); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_8_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday, PyObject *__pyx_v_startingMonth, PyObject *__pyx_v_qtr_with_extra_week, PyObject *__pyx_v_variation); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_4_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_6_rollback_to_year(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_8_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_10get_weeks(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_12year_has_extra_week(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_14is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_16_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_19qtr_with_extra_week___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter_4is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_4_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_6is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_18CustomBusinessHour___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_offset); /* proto */
static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_2cbday_roll(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_4m_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_6month_roll(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_8_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other); /* proto */
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_8_get_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10to_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12shift_months(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, int __pyx_v_months, PyObject *__pyx_v_day_opt, NPY_DATETIMEUNIT __pyx_v_reso); /* proto */
static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_14shift_month(CYTHON_UNUSED PyObject *__pyx_self, PyDateTime_DateTime *__pyx_v_stamp, PyObject *__pyx_v_months, PyObject *__pyx_v_day_opt); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16roll_convention(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_other, int __pyx_v_n, int __pyx_v_compare); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_18roll_qtrday(CYTHON_UNUSED PyObject *__pyx_self, PyDateTime_DateTime *__pyx_v_other, PyObject *__pyx_v_n, PyObject *__pyx_v_month, PyObject *__pyx_v_day_opt, PyObject *__pyx_v_modby); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20__pyx_unpickle_BaseOffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_22__pyx_unpickle_RelativeDeltaOffset(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_6pandas_5_libs_6tslibs_7offsets_BaseOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Day(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Hour(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Minute(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Second(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Milli(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Micro(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Nano(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessDay(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessHour(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BYearEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BYearBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Week(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Easter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_12;
static PyObject *__pyx_int_13;
static PyObject *__pyx_int_14;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_27;
static PyObject *__pyx_int_52;
static PyObject *__pyx_int_53;
static PyObject *__pyx_int_60;
static PyObject *__pyx_int_1000;
static PyObject *__pyx_int_2014;
static PyObject *__pyx_int_3600;
static PyObject *__pyx_int_86400;
static PyObject *__pyx_int_1000000;
static PyObject *__pyx_int_10844460;
static PyObject *__pyx_int_171034093;
static PyObject *__pyx_int_213572416;
static PyObject *__pyx_int_1000000000;
static PyObject *__pyx_int_60000000000;
static PyObject *__pyx_int_3600000000000;
static PyObject *__pyx_int_86400000000000;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k__34;
static PyObject *__pyx_k__40;
static PyObject *__pyx_k__56;
static PyObject *__pyx_k__57;
static PyObject *__pyx_k__58;
static NPY_DATETIMEUNIT __pyx_k__64;
static NPY_DATETIMEUNIT __pyx_k__66;
static NPY_DATETIMEUNIT __pyx_k__67;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__53;
static PyObject *__pyx_slice__60;
static PyObject *__pyx_slice__61;
static PyObject *__pyx_slice__62;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_codeobj__2;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__101;
/* Late includes */

/* "pandas/_libs/tslibs/offsets.pyx":89
 * # Misc Helpers
 * 
 * cdef bint is_offset_object(object obj):             # <<<<<<<<<<<<<<
 *     return isinstance(obj, BaseOffset)
 * 
 */

static int __pyx_f_6pandas_5_libs_6tslibs_7offsets_is_offset_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("is_offset_object", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":90
 * 
 * cdef bint is_offset_object(object obj):
 *     return isinstance(obj, BaseOffset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":89
 * # Misc Helpers
 * 
 * cdef bint is_offset_object(object obj):             # <<<<<<<<<<<<<<
 *     return isinstance(obj, BaseOffset)
 * 
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":93
 * 
 * 
 * cdef bint is_tick_object(object obj):             # <<<<<<<<<<<<<<
 *     return isinstance(obj, Tick)
 * 
 */

static int __pyx_f_6pandas_5_libs_6tslibs_7offsets_is_tick_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("is_tick_object", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":94
 * 
 * cdef bint is_tick_object(object obj):
 *     return isinstance(obj, Tick)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":93
 * 
 * 
 * cdef bint is_tick_object(object obj):             # <<<<<<<<<<<<<<
 *     return isinstance(obj, Tick)
 * 
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":97
 * 
 * 
 * cdef datetime _as_datetime(datetime obj):             # <<<<<<<<<<<<<<
 *     if isinstance(obj, _Timestamp):
 *         return obj.to_pydatetime()
 */

static PyDateTime_DateTime *__pyx_f_6pandas_5_libs_6tslibs_7offsets__as_datetime(PyDateTime_DateTime *__pyx_v_obj) {
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_as_datetime", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":98
 * 
 * cdef datetime _as_datetime(datetime obj):
 *     if isinstance(obj, _Timestamp):             # <<<<<<<<<<<<<<
 *         return obj.to_pydatetime()
 *     return obj
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_obj), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":99
 * cdef datetime _as_datetime(datetime obj):
 *     if isinstance(obj, _Timestamp):
 *         return obj.to_pydatetime()             # <<<<<<<<<<<<<<
 *     return obj
 * 
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj), __pyx_n_s_to_pydatetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 99, __pyx_L1_error)
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":98
 * 
 * cdef datetime _as_datetime(datetime obj):
 *     if isinstance(obj, _Timestamp):             # <<<<<<<<<<<<<<
 *         return obj.to_pydatetime()
 *     return obj
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":100
 *     if isinstance(obj, _Timestamp):
 *         return obj.to_pydatetime()
 *     return obj             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_obj));
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":97
 * 
 * 
 * cdef datetime _as_datetime(datetime obj):             # <<<<<<<<<<<<<<
 *     if isinstance(obj, _Timestamp):
 *         return obj.to_pydatetime()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._as_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":103
 * 
 * 
 * cdef bint _is_normalized(datetime dt):             # <<<<<<<<<<<<<<
 *     if dt.hour != 0 or dt.minute != 0 or dt.second != 0 or dt.microsecond != 0:
 *         # Regardless of whether dt is datetime vs Timestamp
 */

static int __pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_normalized", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":104
 * 
 * cdef bint _is_normalized(datetime dt):
 *     if dt.hour != 0 or dt.minute != 0 or dt.second != 0 or dt.microsecond != 0:             # <<<<<<<<<<<<<<
 *         # Regardless of whether dt is datetime vs Timestamp
 *         return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_minute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_microsecond); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":106
 *     if dt.hour != 0 or dt.minute != 0 or dt.second != 0 or dt.microsecond != 0:
 *         # Regardless of whether dt is datetime vs Timestamp
 *         return False             # <<<<<<<<<<<<<<
 *     if isinstance(dt, _Timestamp):
 *         return dt.nanosecond == 0
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":104
 * 
 * cdef bint _is_normalized(datetime dt):
 *     if dt.hour != 0 or dt.minute != 0 or dt.second != 0 or dt.microsecond != 0:             # <<<<<<<<<<<<<<
 *         # Regardless of whether dt is datetime vs Timestamp
 *         return False
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":107
 *         # Regardless of whether dt is datetime vs Timestamp
 *         return False
 *     if isinstance(dt, _Timestamp):             # <<<<<<<<<<<<<<
 *         return dt.nanosecond == 0
 *     return True
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_dt), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp); 
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":108
 *         return False
 *     if isinstance(dt, _Timestamp):
 *         return dt.nanosecond == 0             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":107
 *         # Regardless of whether dt is datetime vs Timestamp
 *         return False
 *     if isinstance(dt, _Timestamp):             # <<<<<<<<<<<<<<
 *         return dt.nanosecond == 0
 *     return True
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":109
 *     if isinstance(dt, _Timestamp):
 *         return dt.nanosecond == 0
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":103
 * 
 * 
 * cdef bint _is_normalized(datetime dt):             # <<<<<<<<<<<<<<
 *     if dt.hour != 0 or dt.minute != 0 or dt.second != 0 or dt.microsecond != 0:
 *         # Regardless of whether dt is datetime vs Timestamp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("pandas._libs.tslibs.offsets._is_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":112
 * 
 * 
 * def apply_wrapper_core(func, self, other) -> ndarray:             # <<<<<<<<<<<<<<
 *     result = func(self, other)
 *     result = np.asarray(result)
 */

/* Python wrapper */
static PyArrayObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_1apply_wrapper_core(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_1apply_wrapper_core = {"apply_wrapper_core", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_1apply_wrapper_core, METH_VARARGS|METH_KEYWORDS, 0};
static PyArrayObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_1apply_wrapper_core(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyArrayObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_wrapper_core (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_self,&__pyx_n_s_other,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_wrapper_core", 1, 3, 3, 1); __PYX_ERR(0, 112, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_wrapper_core", 1, 3, 3, 2); __PYX_ERR(0, 112, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_wrapper_core") < 0)) __PYX_ERR(0, 112, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_func = values[0];
    __pyx_v_self = values[1];
    __pyx_v_other = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_wrapper_core", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 112, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_wrapper_core", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_apply_wrapper_core(__pyx_self, __pyx_v_func, __pyx_v_self, __pyx_v_other);

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

static PyArrayObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_apply_wrapper_core(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_normalize_i8_timestamps = NULL;
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_wrapper_core", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":113
 * 
 * def apply_wrapper_core(func, self, other) -> ndarray:
 *     result = func(self, other)             # <<<<<<<<<<<<<<
 *     result = np.asarray(result)
 * 
 */
  __Pyx_INCREF(__pyx_v_func);
  __pyx_t_2 = __pyx_v_func; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_other};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_other};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_other);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":114
 * def apply_wrapper_core(func, self, other) -> ndarray:
 *     result = func(self, other)
 *     result = np.asarray(result)             # <<<<<<<<<<<<<<
 * 
 *     if self.normalize:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":116
 *     result = np.asarray(result)
 * 
 *     if self.normalize:             # <<<<<<<<<<<<<<
 *         # TODO: Avoid circular/runtime import
 *         from .vectorized import normalize_i8_timestamps
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":118
 *     if self.normalize:
 *         # TODO: Avoid circular/runtime import
 *         from .vectorized import normalize_i8_timestamps             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(other.dtype)
 *         result = normalize_i8_timestamps(result.view("i8"), None, reso=reso)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_normalize_i8_timestamps);
    __Pyx_GIVEREF(__pyx_n_s_normalize_i8_timestamps);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_normalize_i8_timestamps);
    __pyx_t_5 = __Pyx_Import(__pyx_n_s_vectorized, __pyx_t_1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_normalize_i8_timestamps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_normalize_i8_timestamps = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":119
 *         # TODO: Avoid circular/runtime import
 *         from .vectorized import normalize_i8_timestamps
 *         reso = get_unit_from_dtype(other.dtype)             # <<<<<<<<<<<<<<
 *         result = normalize_i8_timestamps(result.view("i8"), None, reso=reso)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 119, __pyx_L1_error)
    __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_5));
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":120
 *         from .vectorized import normalize_i8_timestamps
 *         reso = get_unit_from_dtype(other.dtype)
 *         result = normalize_i8_timestamps(result.view("i8"), None, reso=reso)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_u_i8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(__pyx_v_reso); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_reso, __pyx_t_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_normalize_i8_timestamps, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":116
 *     result = np.asarray(result)
 * 
 *     if self.normalize:             # <<<<<<<<<<<<<<
 *         # TODO: Avoid circular/runtime import
 *         from .vectorized import normalize_i8_timestamps
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":122
 *         result = normalize_i8_timestamps(result.view("i8"), None, reso=reso)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyArrayObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":112
 * 
 * 
 * def apply_wrapper_core(func, self, other) -> ndarray:             # <<<<<<<<<<<<<<
 *     result = func(self, other)
 *     result = np.asarray(result)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_wrapper_core", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_normalize_i8_timestamps);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":125
 * 
 * 
 * def apply_array_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_3apply_array_wraps(PyObject *__pyx_self, PyObject *__pyx_v_func); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_3apply_array_wraps = {"apply_array_wraps", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_3apply_array_wraps, METH_O, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_3apply_array_wraps(PyObject *__pyx_self, PyObject *__pyx_v_func) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_array_wraps (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_2apply_array_wraps(__pyx_self, ((PyObject *)__pyx_v_func));

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

/* "pandas/_libs/tslibs/offsets.pyx":128
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 *     def wrapper(self, other) -> np.ndarray:             # <<<<<<<<<<<<<<
 *         # other is a DatetimeArray
 *         result = apply_wrapper_core(func, self, other)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_1wrapper = {"wrapper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_1wrapper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrapper (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wrapper", 1, 2, 2, 1); __PYX_ERR(0, 128, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrapper") < 0)) __PYX_ERR(0, 128, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrapper", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 128, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_array_wraps.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_wrapper(__pyx_self, __pyx_v_self, __pyx_v_other);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *__pyx_cur_scope;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *__pyx_outer_scope;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapper", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pandas/_libs/tslibs/offsets.pyx":130
 *     def wrapper(self, other) -> np.ndarray:
 *         # other is a DatetimeArray
 *         result = apply_wrapper_core(func, self, other)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_apply_wrapper_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 130, __pyx_L1_error) }
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_func, __pyx_v_self, __pyx_v_other};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_func, __pyx_v_self, __pyx_v_other};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_func);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_other);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":131
 *         # other is a DatetimeArray
 *         result = apply_wrapper_core(func, self, other)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     # do @functools.wraps(func) manually since it doesn't work on cdef funcs
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":128
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 *     def wrapper(self, other) -> np.ndarray:             # <<<<<<<<<<<<<<
 *         # other is a DatetimeArray
 *         result = apply_wrapper_core(func, self, other)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_array_wraps.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":125
 * 
 * 
 * def apply_array_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_2apply_array_wraps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *__pyx_cur_scope;
  PyObject *__pyx_v_wrapper = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_array_wraps", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 125, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_func = __pyx_v_func;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);

  /* "pandas/_libs/tslibs/offsets.pyx":128
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 *     def wrapper(self, other) -> np.ndarray:             # <<<<<<<<<<<<<<
 *         # other is a DatetimeArray
 *         result = apply_wrapper_core(func, self, other)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, __pyx_t_3) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_17apply_array_wraps_1wrapper, 0, __pyx_n_s_apply_array_wraps_locals_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_wrapper = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":134
 * 
 *     # do @functools.wraps(func) manually since it doesn't work on cdef funcs
 *     wrapper.__name__ = func.__name__             # <<<<<<<<<<<<<<
 *     wrapper.__doc__ = func.__doc__
 *     return wrapper
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_wrapper, __pyx_n_s_name, __pyx_t_3) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":135
 *     # do @functools.wraps(func) manually since it doesn't work on cdef funcs
 *     wrapper.__name__ = func.__name__
 *     wrapper.__doc__ = func.__doc__             # <<<<<<<<<<<<<<
 *     return wrapper
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_wrapper, __pyx_n_s_doc, __pyx_t_3) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":136
 *     wrapper.__name__ = func.__name__
 *     wrapper.__doc__ = func.__doc__
 *     return wrapper             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":125
 * 
 * 
 * def apply_array_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_array_wraps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":139
 * 
 * 
 * def apply_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_5apply_wraps(PyObject *__pyx_self, PyObject *__pyx_v_func); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_5apply_wraps = {"apply_wraps", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_5apply_wraps, METH_O, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_5apply_wraps(PyObject *__pyx_self, PyObject *__pyx_v_func) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_wraps (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4apply_wraps(__pyx_self, ((PyObject *)__pyx_v_func));

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

/* "pandas/_libs/tslibs/offsets.pyx":143
 *     # not play nicely with cython class methods
 * 
 *     def wrapper(self, other):             # <<<<<<<<<<<<<<
 * 
 *         if other is NaT:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_1wrapper = {"wrapper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_1wrapper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrapper (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wrapper", 1, 2, 2, 1); __PYX_ERR(0, 143, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrapper") < 0)) __PYX_ERR(0, 143, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrapper", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 143, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_wraps.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_wrapper(__pyx_self, __pyx_v_self, __pyx_v_other);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *__pyx_cur_scope;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *__pyx_outer_scope;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_nano = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapper", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":145
 *     def wrapper(self, other):
 * 
 *         if other is NaT:             # <<<<<<<<<<<<<<
 *             return NaT
 *         elif (
 */
  __pyx_t_1 = (__pyx_v_other == ((PyObject *)__pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":146
 * 
 *         if other is NaT:
 *             return NaT             # <<<<<<<<<<<<<<
 *         elif (
 *             isinstance(other, BaseOffset)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT));
    __pyx_r = ((PyObject *)__pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT);
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":145
 *     def wrapper(self, other):
 * 
 *         if other is NaT:             # <<<<<<<<<<<<<<
 *             return NaT
 *         elif (
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":148
 *             return NaT
 *         elif (
 *             isinstance(other, BaseOffset)             # <<<<<<<<<<<<<<
 *             or PyDelta_Check(other)
 *             or util.is_timedelta64_object(other)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":149
 *         elif (
 *             isinstance(other, BaseOffset)
 *             or PyDelta_Check(other)             # <<<<<<<<<<<<<<
 *             or util.is_timedelta64_object(other)
 *         ):
 */
  __pyx_t_3 = (PyDelta_Check(__pyx_v_other) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":150
 *             isinstance(other, BaseOffset)
 *             or PyDelta_Check(other)
 *             or util.is_timedelta64_object(other)             # <<<<<<<<<<<<<<
 *         ):
 *             # timedelta path
 */
  __pyx_t_3 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_timedelta64_object(__pyx_v_other) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;

  /* "pandas/_libs/tslibs/offsets.pyx":147
 *         if other is NaT:
 *             return NaT
 *         elif (             # <<<<<<<<<<<<<<
 *             isinstance(other, BaseOffset)
 *             or PyDelta_Check(other)
 */
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":153
 *         ):
 *             # timedelta path
 *             return func(self, other)             # <<<<<<<<<<<<<<
 *         elif is_datetime64_object(other) or PyDate_Check(other):
 *             # PyDate_Check includes date, datetime
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 153, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_func; __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_other};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_other};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self);
      __Pyx_INCREF(__pyx_v_other);
      __Pyx_GIVEREF(__pyx_v_other);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_other);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":147
 *         if other is NaT:
 *             return NaT
 *         elif (             # <<<<<<<<<<<<<<
 *             isinstance(other, BaseOffset)
 *             or PyDelta_Check(other)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":154
 *             # timedelta path
 *             return func(self, other)
 *         elif is_datetime64_object(other) or PyDate_Check(other):             # <<<<<<<<<<<<<<
 *             # PyDate_Check includes date, datetime
 *             other = Timestamp(other)
 */
  __pyx_t_3 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_datetime64_object(__pyx_v_other) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (PyDate_Check(__pyx_v_other) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L7_bool_binop_done:;
  if (likely(__pyx_t_2)) {

    /* "pandas/_libs/tslibs/offsets.pyx":156
 *         elif is_datetime64_object(other) or PyDate_Check(other):
 *             # PyDate_Check includes date, datetime
 *             other = Timestamp(other)             # <<<<<<<<<<<<<<
 *         else:
 *             # This will end up returning NotImplemented back in __add__
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_other);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":154
 *             # timedelta path
 *             return func(self, other)
 *         elif is_datetime64_object(other) or PyDate_Check(other):             # <<<<<<<<<<<<<<
 *             # PyDate_Check includes date, datetime
 *             other = Timestamp(other)
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":159
 *         else:
 *             # This will end up returning NotImplemented back in __add__
 *             raise ApplyTypeError             # <<<<<<<<<<<<<<
 * 
 *         tz = other.tzinfo
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ApplyTypeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 159, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":161
 *             raise ApplyTypeError
 * 
 *         tz = other.tzinfo             # <<<<<<<<<<<<<<
 *         nano = other.nanosecond
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tz = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":162
 * 
 *         tz = other.tzinfo
 *         nano = other.nanosecond             # <<<<<<<<<<<<<<
 * 
 *         if self._adjust_dst:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_nano = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":164
 *         nano = other.nanosecond
 * 
 *         if self._adjust_dst:             # <<<<<<<<<<<<<<
 *             other = other.tz_localize(None)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adjust_dst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":165
 * 
 *         if self._adjust_dst:
 *             other = other.tz_localize(None)             # <<<<<<<<<<<<<<
 * 
 *         result = func(self, other)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_tz_localize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_None);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":164
 *         nano = other.nanosecond
 * 
 *         if self._adjust_dst:             # <<<<<<<<<<<<<<
 *             other = other.tz_localize(None)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":167
 *             other = other.tz_localize(None)
 * 
 *         result = func(self, other)             # <<<<<<<<<<<<<<
 * 
 *         result = Timestamp(result)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 167, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_func; __pyx_t_8 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_v_other};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_v_other};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_other);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":169
 *         result = func(self, other)
 * 
 *         result = Timestamp(result)             # <<<<<<<<<<<<<<
 *         if self._adjust_dst:
 *             result = result.tz_localize(tz)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":170
 * 
 *         result = Timestamp(result)
 *         if self._adjust_dst:             # <<<<<<<<<<<<<<
 *             result = result.tz_localize(tz)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adjust_dst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":171
 *         result = Timestamp(result)
 *         if self._adjust_dst:
 *             result = result.tz_localize(tz)             # <<<<<<<<<<<<<<
 * 
 *         if self.normalize:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_tz_localize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_tz) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_tz);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":170
 * 
 *         result = Timestamp(result)
 *         if self._adjust_dst:             # <<<<<<<<<<<<<<
 *             result = result.tz_localize(tz)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":173
 *             result = result.tz_localize(tz)
 * 
 *         if self.normalize:             # <<<<<<<<<<<<<<
 *             result = result.normalize()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":174
 * 
 *         if self.normalize:
 *             result = result.normalize()             # <<<<<<<<<<<<<<
 * 
 *         # If the offset object does not have a nanoseconds component,
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_normalize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":173
 *             result = result.tz_localize(tz)
 * 
 *         if self.normalize:             # <<<<<<<<<<<<<<
 *             result = result.normalize()
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":178
 *         # If the offset object does not have a nanoseconds component,
 *         # the result's nanosecond component may be lost.
 *         if not self.normalize and nano != 0 and not hasattr(self, "nanoseconds"):             # <<<<<<<<<<<<<<
 *             if result.nanosecond != nano:
 *                 if result.tz is not None:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_3) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_v_nano, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_u_nanoseconds); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error)
  __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":179
 *         # the result's nanosecond component may be lost.
 *         if not self.normalize and nano != 0 and not hasattr(self, "nanoseconds"):
 *             if result.nanosecond != nano:             # <<<<<<<<<<<<<<
 *                 if result.tz is not None:
 *                     # convert to UTC
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_v_nano, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/_libs/tslibs/offsets.pyx":180
 *         if not self.normalize and nano != 0 and not hasattr(self, "nanoseconds"):
 *             if result.nanosecond != nano:
 *                 if result.tz is not None:             # <<<<<<<<<<<<<<
 *                     # convert to UTC
 *                     value = result.tz_localize(None).value
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_tz); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = (__pyx_t_5 != Py_None);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = (__pyx_t_2 != 0);
      if (__pyx_t_3) {

        /* "pandas/_libs/tslibs/offsets.pyx":182
 *                 if result.tz is not None:
 *                     # convert to UTC
 *                     value = result.tz_localize(None).value             # <<<<<<<<<<<<<<
 *                 else:
 *                     value = result.value
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_tz_localize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_value = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":180
 *         if not self.normalize and nano != 0 and not hasattr(self, "nanoseconds"):
 *             if result.nanosecond != nano:
 *                 if result.tz is not None:             # <<<<<<<<<<<<<<
 *                     # convert to UTC
 *                     value = result.tz_localize(None).value
 */
        goto __pyx_L17;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":184
 *                     value = result.tz_localize(None).value
 *                 else:
 *                     value = result.value             # <<<<<<<<<<<<<<
 *                 result = Timestamp(value + nano)
 * 
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_value = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L17:;

      /* "pandas/_libs/tslibs/offsets.pyx":185
 *                 else:
 *                     value = result.value
 *                 result = Timestamp(value + nano)             # <<<<<<<<<<<<<<
 * 
 *         if tz is not None and result.tzinfo is None:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyNumber_Add(__pyx_v_value, __pyx_v_nano); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":179
 *         # the result's nanosecond component may be lost.
 *         if not self.normalize and nano != 0 and not hasattr(self, "nanoseconds"):
 *             if result.nanosecond != nano:             # <<<<<<<<<<<<<<
 *                 if result.tz is not None:
 *                     # convert to UTC
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":178
 *         # If the offset object does not have a nanoseconds component,
 *         # the result's nanosecond component may be lost.
 *         if not self.normalize and nano != 0 and not hasattr(self, "nanoseconds"):             # <<<<<<<<<<<<<<
 *             if result.nanosecond != nano:
 *                 if result.tz is not None:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":187
 *                 result = Timestamp(value + nano)
 * 
 *         if tz is not None and result.tzinfo is None:             # <<<<<<<<<<<<<<
 *             result = result.tz_localize(tz)
 * 
 */
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = (__pyx_t_4 == Py_None);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":188
 * 
 *         if tz is not None and result.tzinfo is None:
 *             result = result.tz_localize(tz)             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_tz_localize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_tz) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_tz);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":187
 *                 result = Timestamp(value + nano)
 * 
 *         if tz is not None and result.tzinfo is None:             # <<<<<<<<<<<<<<
 *             result = result.tz_localize(tz)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":190
 *             result = result.tz_localize(tz)
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     # do @functools.wraps(func) manually since it doesn't work on cdef funcs
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":143
 *     # not play nicely with cython class methods
 * 
 *     def wrapper(self, other):             # <<<<<<<<<<<<<<
 * 
 *         if other is NaT:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_wraps.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_nano);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":139
 * 
 * 
 * def apply_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4apply_wraps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *__pyx_cur_scope;
  PyObject *__pyx_v_wrapper = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_wraps", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 139, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_func = __pyx_v_func;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);

  /* "pandas/_libs/tslibs/offsets.pyx":143
 *     # not play nicely with cython class methods
 * 
 *     def wrapper(self, other):             # <<<<<<<<<<<<<<
 * 
 *         if other is NaT:
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_11apply_wraps_1wrapper, 0, __pyx_n_s_apply_wraps_locals_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrapper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":193
 * 
 *     # do @functools.wraps(func) manually since it doesn't work on cdef funcs
 *     wrapper.__name__ = func.__name__             # <<<<<<<<<<<<<<
 *     wrapper.__doc__ = func.__doc__
 *     return wrapper
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_wrapper, __pyx_n_s_name, __pyx_t_1) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":194
 *     # do @functools.wraps(func) manually since it doesn't work on cdef funcs
 *     wrapper.__name__ = func.__name__
 *     wrapper.__doc__ = func.__doc__             # <<<<<<<<<<<<<<
 *     return wrapper
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_wrapper, __pyx_n_s_doc, __pyx_t_1) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":195
 *     wrapper.__name__ = func.__name__
 *     wrapper.__doc__ = func.__doc__
 *     return wrapper             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":139
 * 
 * 
 * def apply_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.apply_wraps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":198
 * 
 * 
 * cdef _wrap_timedelta_result(result):             # <<<<<<<<<<<<<<
 *     """
 *     Tick operations dispatch to their Timedelta counterparts.  Wrap the result
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__wrap_timedelta_result(PyObject *__pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_wrap_timedelta_result", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":211
 *     object
 *     """
 *     if PyDelta_Check(result):             # <<<<<<<<<<<<<<
 *         # convert Timedelta back to a Tick
 *         return delta_to_tick(result)
 */
  __pyx_t_1 = (PyDelta_Check(__pyx_v_result) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":213
 *     if PyDelta_Check(result):
 *         # convert Timedelta back to a Tick
 *         return delta_to_tick(result)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_delta_to_tick); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":211
 *     object
 *     """
 *     if PyDelta_Check(result):             # <<<<<<<<<<<<<<
 *         # convert Timedelta back to a Tick
 *         return delta_to_tick(result)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":215
 *         return delta_to_tick(result)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * # ---------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":198
 * 
 * 
 * cdef _wrap_timedelta_result(result):             # <<<<<<<<<<<<<<
 *     """
 *     Tick operations dispatch to their Timedelta counterparts.  Wrap the result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._wrap_timedelta_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":221
 * 
 * 
 * cdef _get_calendar(weekmask, holidays, calendar):             # <<<<<<<<<<<<<<
 *     """
 *     Generate busdaycalendar
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__get_calendar(PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar) {
  PyObject *__pyx_v_kwargs = NULL;
  PyObject *__pyx_v_busdaycalendar = NULL;
  PyObject *__pyx_7genexpr__pyx_v_dt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_calendar", 0);
  __Pyx_INCREF(__pyx_v_holidays);

  /* "pandas/_libs/tslibs/offsets.pyx":225
 *     Generate busdaycalendar
 *     """
 *     if isinstance(calendar, np.busdaycalendar):             # <<<<<<<<<<<<<<
 *         if not holidays:
 *             holidays = tuple(calendar.holidays)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_busdaycalendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_calendar, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":226
 *     """
 *     if isinstance(calendar, np.busdaycalendar):
 *         if not holidays:             # <<<<<<<<<<<<<<
 *             holidays = tuple(calendar.holidays)
 *         elif not isinstance(holidays, tuple):
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_holidays); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 226, __pyx_L1_error)
    __pyx_t_3 = ((!__pyx_t_4) != 0);
    if (__pyx_t_3) {

      /* "pandas/_libs/tslibs/offsets.pyx":227
 *     if isinstance(calendar, np.busdaycalendar):
 *         if not holidays:
 *             holidays = tuple(calendar.holidays)             # <<<<<<<<<<<<<<
 *         elif not isinstance(holidays, tuple):
 *             holidays = tuple(holidays)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_holidays); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":226
 *     """
 *     if isinstance(calendar, np.busdaycalendar):
 *         if not holidays:             # <<<<<<<<<<<<<<
 *             holidays = tuple(calendar.holidays)
 *         elif not isinstance(holidays, tuple):
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":228
 *         if not holidays:
 *             holidays = tuple(calendar.holidays)
 *         elif not isinstance(holidays, tuple):             # <<<<<<<<<<<<<<
 *             holidays = tuple(holidays)
 *         else:
 */
    __pyx_t_3 = PyTuple_Check(__pyx_v_holidays); 
    __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
    if (__pyx_t_4) {

      /* "pandas/_libs/tslibs/offsets.pyx":229
 *             holidays = tuple(calendar.holidays)
 *         elif not isinstance(holidays, tuple):
 *             holidays = tuple(holidays)             # <<<<<<<<<<<<<<
 *         else:
 *             # trust that calendar.holidays and holidays are
 */
      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_holidays); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":228
 *         if not holidays:
 *             holidays = tuple(calendar.holidays)
 *         elif not isinstance(holidays, tuple):             # <<<<<<<<<<<<<<
 *             holidays = tuple(holidays)
 *         else:
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":233
 *             # trust that calendar.holidays and holidays are
 *             # consistent
 *             pass             # <<<<<<<<<<<<<<
 *         return calendar, holidays
 * 
 */
    /*else*/ {
    }
    __pyx_L4:;

    /* "pandas/_libs/tslibs/offsets.pyx":234
 *             # consistent
 *             pass
 *         return calendar, holidays             # <<<<<<<<<<<<<<
 * 
 *     if holidays is None:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_calendar);
    __Pyx_GIVEREF(__pyx_v_calendar);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_calendar);
    __Pyx_INCREF(__pyx_v_holidays);
    __Pyx_GIVEREF(__pyx_v_holidays);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_holidays);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":225
 *     Generate busdaycalendar
 *     """
 *     if isinstance(calendar, np.busdaycalendar):             # <<<<<<<<<<<<<<
 *         if not holidays:
 *             holidays = tuple(calendar.holidays)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":236
 *         return calendar, holidays
 * 
 *     if holidays is None:             # <<<<<<<<<<<<<<
 *         holidays = []
 *     try:
 */
  __pyx_t_4 = (__pyx_v_holidays == Py_None);
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":237
 * 
 *     if holidays is None:
 *         holidays = []             # <<<<<<<<<<<<<<
 *     try:
 *         holidays = holidays + calendar.holidays().tolist()
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":236
 *         return calendar, holidays
 * 
 *     if holidays is None:             # <<<<<<<<<<<<<<
 *         holidays = []
 *     try:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":238
 *     if holidays is None:
 *         holidays = []
 *     try:             # <<<<<<<<<<<<<<
 *         holidays = holidays + calendar.holidays().tolist()
 *     except AttributeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":239
 *         holidays = []
 *     try:
 *         holidays = holidays + calendar.holidays().tolist()             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         pass
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_holidays); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_Add(__pyx_v_holidays, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":238
 *     if holidays is None:
 *         holidays = []
 *     try:             # <<<<<<<<<<<<<<
 *         holidays = holidays + calendar.holidays().tolist()
 *     except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;

    /* "pandas/_libs/tslibs/offsets.pyx":240
 *     try:
 *         holidays = holidays + calendar.holidays().tolist()
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         pass
 *     holidays = [_to_dt64D(dt) for dt in holidays]
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;
    __pyx_L8_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":238
 *     if holidays is None:
 *         holidays = []
 *     try:             # <<<<<<<<<<<<<<
 *         holidays = holidays + calendar.holidays().tolist()
 *     except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L11_try_end:;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":242
 *     except AttributeError:
 *         pass
 *     holidays = [_to_dt64D(dt) for dt in holidays]             # <<<<<<<<<<<<<<
 *     holidays = tuple(sorted(holidays))
 * 
 */
  { /* enter inner scope */
    __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (likely(PyList_CheckExact(__pyx_v_holidays)) || PyTuple_CheckExact(__pyx_v_holidays)) {
      __pyx_t_1 = __pyx_v_holidays; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_holidays); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 242, __pyx_L14_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 242, __pyx_L14_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 242, __pyx_L14_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 242, __pyx_L14_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_dt, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__to_dt64D(__pyx_7genexpr__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 242, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dt); __pyx_7genexpr__pyx_v_dt = 0;
    goto __pyx_L17_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dt); __pyx_7genexpr__pyx_v_dt = 0;
    goto __pyx_L1_error;
    __pyx_L17_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":243
 *         pass
 *     holidays = [_to_dt64D(dt) for dt in holidays]
 *     holidays = tuple(sorted(holidays))             # <<<<<<<<<<<<<<
 * 
 *     kwargs = {'weekmask': weekmask}
 */
  __pyx_t_1 = PySequence_List(__pyx_v_holidays); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_13 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 243, __pyx_L1_error)
  if (unlikely(__pyx_t_8 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 243, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":245
 *     holidays = tuple(sorted(holidays))
 * 
 *     kwargs = {'weekmask': weekmask}             # <<<<<<<<<<<<<<
 *     if holidays:
 *         kwargs['holidays'] = holidays
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_weekmask, __pyx_v_weekmask) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
  __pyx_v_kwargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":246
 * 
 *     kwargs = {'weekmask': weekmask}
 *     if holidays:             # <<<<<<<<<<<<<<
 *         kwargs['holidays'] = holidays
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_holidays); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":247
 *     kwargs = {'weekmask': weekmask}
 *     if holidays:
 *         kwargs['holidays'] = holidays             # <<<<<<<<<<<<<<
 * 
 *     busdaycalendar = np.busdaycalendar(**kwargs)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_holidays, __pyx_v_holidays) < 0)) __PYX_ERR(0, 247, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":246
 * 
 *     kwargs = {'weekmask': weekmask}
 *     if holidays:             # <<<<<<<<<<<<<<
 *         kwargs['holidays'] = holidays
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":249
 *         kwargs['holidays'] = holidays
 * 
 *     busdaycalendar = np.busdaycalendar(**kwargs)             # <<<<<<<<<<<<<<
 *     return busdaycalendar, holidays
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_busdaycalendar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_busdaycalendar = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":250
 * 
 *     busdaycalendar = np.busdaycalendar(**kwargs)
 *     return busdaycalendar, holidays             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_busdaycalendar);
  __Pyx_GIVEREF(__pyx_v_busdaycalendar);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_busdaycalendar);
  __Pyx_INCREF(__pyx_v_holidays);
  __Pyx_GIVEREF(__pyx_v_holidays);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_holidays);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":221
 * 
 * 
 * cdef _get_calendar(weekmask, holidays, calendar):             # <<<<<<<<<<<<<<
 *     """
 *     Generate busdaycalendar
 */

  /* 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_AddTraceback("pandas._libs.tslibs.offsets._get_calendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XDECREF(__pyx_v_busdaycalendar);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_holidays);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":253
 * 
 * 
 * cdef _to_dt64D(dt):             # <<<<<<<<<<<<<<
 *     # Currently
 *     # > np.datetime64(dt.datetime(2013,5,1),dtype='datetime64[D]')
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__to_dt64D(PyObject *__pyx_v_dt) {
  PyObject *__pyx_v_naive = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_dt64D", 0);
  __Pyx_INCREF(__pyx_v_dt);

  /* "pandas/_libs/tslibs/offsets.pyx":258
 *     # numpy.datetime64('2013-05-01T02:00:00.000000+0200')
 *     # Thus astype is needed to cast datetime to datetime64[D]
 *     if getattr(dt, 'tzinfo', None) is not None:             # <<<<<<<<<<<<<<
 *         # Get the nanosecond timestamp,
 *         #  equiv `Timestamp(dt).value` or `dt.timestamp() * 10**9`
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_dt, __pyx_n_u_tzinfo, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":261
 *         # Get the nanosecond timestamp,
 *         #  equiv `Timestamp(dt).value` or `dt.timestamp() * 10**9`
 *         naive = dt.astimezone(None)             # <<<<<<<<<<<<<<
 *         dt = np.datetime64(naive, "D")
 *     else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_astimezone); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_naive = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":262
 *         #  equiv `Timestamp(dt).value` or `dt.timestamp() * 10**9`
 *         naive = dt.astimezone(None)
 *         dt = np.datetime64(naive, "D")             # <<<<<<<<<<<<<<
 *     else:
 *         dt = np.datetime64(dt)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_naive, __pyx_n_u_D};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_naive, __pyx_n_u_D};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_naive);
      __Pyx_GIVEREF(__pyx_v_naive);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_naive);
      __Pyx_INCREF(__pyx_n_u_D);
      __Pyx_GIVEREF(__pyx_n_u_D);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_u_D);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":258
 *     # numpy.datetime64('2013-05-01T02:00:00.000000+0200')
 *     # Thus astype is needed to cast datetime to datetime64[D]
 *     if getattr(dt, 'tzinfo', None) is not None:             # <<<<<<<<<<<<<<
 *         # Get the nanosecond timestamp,
 *         #  equiv `Timestamp(dt).value` or `dt.timestamp() * 10**9`
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":264
 *         dt = np.datetime64(naive, "D")
 *     else:
 *         dt = np.datetime64(dt)             # <<<<<<<<<<<<<<
 *     if dt.dtype.name != "datetime64[D]":
 *         dt = dt.astype("datetime64[D]")
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_dt) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_dt);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":265
 *     else:
 *         dt = np.datetime64(dt)
 *     if dt.dtype.name != "datetime64[D]":             # <<<<<<<<<<<<<<
 *         dt = dt.astype("datetime64[D]")
 *     return dt
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_datetime64_D, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":266
 *         dt = np.datetime64(dt)
 *     if dt.dtype.name != "datetime64[D]":
 *         dt = dt.astype("datetime64[D]")             # <<<<<<<<<<<<<<
 *     return dt
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_kp_u_datetime64_D) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_datetime64_D);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":265
 *     else:
 *         dt = np.datetime64(dt)
 *     if dt.dtype.name != "datetime64[D]":             # <<<<<<<<<<<<<<
 *         dt = dt.astype("datetime64[D]")
 *     return dt
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":267
 *     if dt.dtype.name != "datetime64[D]":
 *         dt = dt.astype("datetime64[D]")
 *     return dt             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dt);
  __pyx_r = __pyx_v_dt;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":253
 * 
 * 
 * cdef _to_dt64D(dt):             # <<<<<<<<<<<<<<
 *     # Currently
 *     # > np.datetime64(dt.datetime(2013,5,1),dtype='datetime64[D]')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._to_dt64D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_naive);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":274
 * 
 * 
 * cdef _validate_business_time(t_input):             # <<<<<<<<<<<<<<
 *     if isinstance(t_input, str):
 *         try:
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__validate_business_time(PyObject *__pyx_v_t_input) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_validate_business_time", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":275
 * 
 * cdef _validate_business_time(t_input):
 *     if isinstance(t_input, str):             # <<<<<<<<<<<<<<
 *         try:
 *             t = time.strptime(t_input, '%H:%M')
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_t_input); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":276
 * cdef _validate_business_time(t_input):
 *     if isinstance(t_input, str):
 *         try:             # <<<<<<<<<<<<<<
 *             t = time.strptime(t_input, '%H:%M')
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":277
 *     if isinstance(t_input, str):
 *         try:
 *             t = time.strptime(t_input, '%H:%M')             # <<<<<<<<<<<<<<
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 *         except ValueError:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_strptime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_9 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_t_input, __pyx_kp_u_H_M};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_t_input, __pyx_kp_u_H_M};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 277, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__pyx_t_7) {
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
          }
          __Pyx_INCREF(__pyx_v_t_input);
          __Pyx_GIVEREF(__pyx_v_t_input);
          PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_t_input);
          __Pyx_INCREF(__pyx_kp_u_H_M);
          __Pyx_GIVEREF(__pyx_kp_u_H_M);
          PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_kp_u_H_M);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_t = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":278
 *         try:
 *             t = time.strptime(t_input, '%H:%M')
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             raise ValueError("time data must match '%H:%M' format")
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_tm_hour); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_hour, __pyx_t_8) < 0) __PYX_ERR(0, 278, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_tm_min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_minute, __pyx_t_8) < 0) __PYX_ERR(0, 278, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_time), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L8_try_return;

        /* "pandas/_libs/tslibs/offsets.pyx":276
 * cdef _validate_business_time(t_input):
 *     if isinstance(t_input, str):
 *         try:             # <<<<<<<<<<<<<<
 *             t = time.strptime(t_input, '%H:%M')
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 */
      }
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":279
 *             t = time.strptime(t_input, '%H:%M')
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             raise ValueError("time data must match '%H:%M' format")
 *     elif isinstance(t_input, dt_time):
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("pandas._libs.tslibs.offsets._validate_business_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 279, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_10);

        /* "pandas/_libs/tslibs/offsets.pyx":280
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 *         except ValueError:
 *             raise ValueError("time data must match '%H:%M' format")             # <<<<<<<<<<<<<<
 *     elif isinstance(t_input, dt_time):
 *         if t_input.second != 0 or t_input.microsecond != 0:
 */
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 280, __pyx_L6_except_error)
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "pandas/_libs/tslibs/offsets.pyx":276
 * cdef _validate_business_time(t_input):
 *     if isinstance(t_input, str):
 *         try:             # <<<<<<<<<<<<<<
 *             t = time.strptime(t_input, '%H:%M')
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L8_try_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":275
 * 
 * cdef _validate_business_time(t_input):
 *     if isinstance(t_input, str):             # <<<<<<<<<<<<<<
 *         try:
 *             t = time.strptime(t_input, '%H:%M')
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":281
 *         except ValueError:
 *             raise ValueError("time data must match '%H:%M' format")
 *     elif isinstance(t_input, dt_time):             # <<<<<<<<<<<<<<
 *         if t_input.second != 0 or t_input.microsecond != 0:
 *             raise ValueError(
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_t_input, __pyx_ptype_7cpython_8datetime_time); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":282
 *             raise ValueError("time data must match '%H:%M' format")
 *     elif isinstance(t_input, dt_time):
 *         if t_input.second != 0 or t_input.microsecond != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "time data must be specified only with hour and minute")
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_input, __pyx_n_s_second); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_t_10, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_input, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyInt_NeObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_L13_bool_binop_done:;
    if (unlikely(__pyx_t_1)) {

      /* "pandas/_libs/tslibs/offsets.pyx":283
 *     elif isinstance(t_input, dt_time):
 *         if t_input.second != 0 or t_input.microsecond != 0:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "time data must be specified only with hour and minute")
 *         return t_input
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 283, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":282
 *             raise ValueError("time data must match '%H:%M' format")
 *     elif isinstance(t_input, dt_time):
 *         if t_input.second != 0 or t_input.microsecond != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "time data must be specified only with hour and minute")
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":285
 *             raise ValueError(
 *                 "time data must be specified only with hour and minute")
 *         return t_input             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("time data must be string or datetime.time")
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_t_input);
    __pyx_r = __pyx_v_t_input;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":281
 *         except ValueError:
 *             raise ValueError("time data must match '%H:%M' format")
 *     elif isinstance(t_input, dt_time):             # <<<<<<<<<<<<<<
 *         if t_input.second != 0 or t_input.microsecond != 0:
 *             raise ValueError(
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":287
 *         return t_input
 *     else:
 *         raise ValueError("time data must be string or datetime.time")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __PYX_ERR(0, 287, __pyx_L1_error)
  }

  /* "pandas/_libs/tslibs/offsets.pyx":274
 * 
 * 
 * cdef _validate_business_time(t_input):             # <<<<<<<<<<<<<<
 *     if isinstance(t_input, str):
 *         try:
 */

  /* 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_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._validate_business_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pandas/_libs/tslibs/offsets.pyx":305
 *     # more, nanosecond(s) are handled by apply_wraps
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()             # <<<<<<<<<<<<<<
 *         if k not in ('nanosecond', 'nanoseconds')
 *     )
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 305, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_determine_offset_locals_genexpr, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!gen)) __PYX_ERR(0, 305, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._determine_offset.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 305, __pyx_L1_error)
  __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds)) { __Pyx_RaiseClosureNameError("kwds"); __PYX_ERR(0, 305, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 305, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":306
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()
 *         if k not in ('nanosecond', 'nanoseconds')             # <<<<<<<<<<<<<<
 *     )
 *     # TODO: Are nanosecond and nanoseconds allowed somewhere?
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_k);
    __pyx_t_6 = __pyx_cur_scope->__pyx_v_k;
    __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_nanosecond, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
    if (__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_nanoseconds, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
    __pyx_t_8 = __pyx_t_9;
    __pyx_L7_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "pandas/_libs/tslibs/offsets.pyx":305
 *     # more, nanosecond(s) are handled by apply_wraps
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()             # <<<<<<<<<<<<<<
 *         if k not in ('nanosecond', 'nanoseconds')
 *     )
 */
      if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_k, (PyObject*)__pyx_cur_scope->__pyx_v_v))) __PYX_ERR(0, 305, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":306
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()
 *         if k not in ('nanosecond', 'nanoseconds')             # <<<<<<<<<<<<<<
 *     )
 *     # TODO: Are nanosecond and nanoseconds allowed somewhere?
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pandas/_libs/tslibs/offsets.pyx":305
 *     # more, nanosecond(s) are handled by apply_wraps
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()             # <<<<<<<<<<<<<<
 *         if k not in ('nanosecond', 'nanoseconds')
 *     )
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pandas/_libs/tslibs/offsets.pyx":317
 *     use_relativedelta = False
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):             # <<<<<<<<<<<<<<
 *             if "millisecond" in kwds_no_nanos:
 *                 raise NotImplementedError(
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 317, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_5generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_determine_offset_locals_genexpr, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!gen)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._determine_offset.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 317, __pyx_L1_error)
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds_no_nanos)) { __Pyx_RaiseClosureNameError("kwds_no_nanos"); __PYX_ERR(0, 317, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds_no_nanos == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 317, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds_no_nanos, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, NULL, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_6 == 0)) break;
    if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__kwds_use_relativedelta)) { __Pyx_RaiseClosureNameError("_kwds_use_relativedelta"); __PYX_ERR(0, 317, __pyx_L1_error) }
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_k, __pyx_cur_scope->__pyx_outer_scope->__pyx_v__kwds_use_relativedelta, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 317, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_8generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pandas/_libs/tslibs/offsets.pyx":330
 *             # sub-daily offset - use timedelta (tz-aware)
 *             offset = timedelta(**kwds_no_nanos)
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):             # <<<<<<<<<<<<<<
 *         offset = timedelta(days=0)
 *     else:
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_6genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 330, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_8generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_determine_offset_locals_genexpr, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!gen)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._determine_offset.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_8generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 330, __pyx_L1_error)
  __pyx_t_1 = __pyx_tuple__8; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= 2) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 330, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_nano);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_nano, ((PyObject*)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds)) { __Pyx_RaiseClosureNameError("kwds"); __PYX_ERR(0, 330, __pyx_L1_error) }
    __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_nano, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwds, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 330, __pyx_L1_error)
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":300
 * 
 * 
 * cdef _determine_offset(kwds):             # <<<<<<<<<<<<<<
 *     # timedelta is used for sub-daily plural offsets and all singular
 *     # offsets, relativedelta is used for plural offsets of daily length or
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyObject *__pyx_v_kwds) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *__pyx_cur_scope;
  int __pyx_v_use_relativedelta;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_2generator = 0;
  PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_5generator1 = 0;
  PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_8generator2 = 0;
  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_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_determine_offset", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 300, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_kwds = __pyx_v_kwds;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwds);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwds);

  /* "pandas/_libs/tslibs/offsets.pyx":305
 *     # more, nanosecond(s) are handled by apply_wraps
 *     kwds_no_nanos = dict(
 *         (k, v) for k, v in kwds.items()             # <<<<<<<<<<<<<<
 *         if k not in ('nanosecond', 'nanoseconds')
 *     )
 */
  __pyx_t_1 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":304
 *     # offsets, relativedelta is used for plural offsets of daily length or
 *     # more, nanosecond(s) are handled by apply_wraps
 *     kwds_no_nanos = dict(             # <<<<<<<<<<<<<<
 *         (k, v) for k, v in kwds.items()
 *         if k not in ('nanosecond', 'nanoseconds')
 */
  __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_kwds_no_nanos = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":310
 *     # TODO: Are nanosecond and nanoseconds allowed somewhere?
 * 
 *     _kwds_use_relativedelta = ('years', 'months', 'weeks', 'days',             # <<<<<<<<<<<<<<
 *                                'year', 'month', 'week', 'day', 'weekday',
 *                                'hour', 'minute', 'second', 'microsecond',
 */
  __Pyx_INCREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);
  __pyx_cur_scope->__pyx_v__kwds_use_relativedelta = __pyx_tuple__9;

  /* "pandas/_libs/tslibs/offsets.pyx":315
 *                                'millisecond')
 * 
 *     use_relativedelta = False             # <<<<<<<<<<<<<<
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 */
  __pyx_v_use_relativedelta = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":316
 * 
 *     use_relativedelta = False
 *     if len(kwds_no_nanos) > 0:             # <<<<<<<<<<<<<<
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 *             if "millisecond" in kwds_no_nanos:
 */
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_kwds_no_nanos;
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 316, __pyx_L1_error)
  }
  __pyx_t_3 = PyDict_Size(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":317
 *     use_relativedelta = False
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):             # <<<<<<<<<<<<<<
 *             if "millisecond" in kwds_no_nanos:
 *                 raise NotImplementedError(
 */
    __pyx_t_2 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "pandas/_libs/tslibs/offsets.pyx":318
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 *             if "millisecond" in kwds_no_nanos:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError(
 *                     "Using DateOffset to replace `millisecond` component in "
 */
      if (unlikely(__pyx_cur_scope->__pyx_v_kwds_no_nanos == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 318, __pyx_L1_error)
      }
      __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_millisecond, __pyx_cur_scope->__pyx_v_kwds_no_nanos, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 318, __pyx_L1_error)
      __pyx_t_5 = (__pyx_t_4 != 0);
      if (unlikely(__pyx_t_5)) {

        /* "pandas/_libs/tslibs/offsets.pyx":319
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 *             if "millisecond" in kwds_no_nanos:
 *                 raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                     "Using DateOffset to replace `millisecond` component in "
 *                     "datetime object is not supported. Use "
 */
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 319, __pyx_L1_error)

        /* "pandas/_libs/tslibs/offsets.pyx":318
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 *             if "millisecond" in kwds_no_nanos:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError(
 *                     "Using DateOffset to replace `millisecond` component in "
 */
      }

      /* "pandas/_libs/tslibs/offsets.pyx":325
 *                     "instead."
 *                 )
 *             offset = relativedelta(**kwds_no_nanos)             # <<<<<<<<<<<<<<
 *             use_relativedelta = True
 *         else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_cur_scope->__pyx_v_kwds_no_nanos == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 325, __pyx_L1_error)
      }
      __pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwds_no_nanos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_offset = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":326
 *                 )
 *             offset = relativedelta(**kwds_no_nanos)
 *             use_relativedelta = True             # <<<<<<<<<<<<<<
 *         else:
 *             # sub-daily offset - use timedelta (tz-aware)
 */
      __pyx_v_use_relativedelta = 1;

      /* "pandas/_libs/tslibs/offsets.pyx":317
 *     use_relativedelta = False
 *     if len(kwds_no_nanos) > 0:
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):             # <<<<<<<<<<<<<<
 *             if "millisecond" in kwds_no_nanos:
 *                 raise NotImplementedError(
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":329
 *         else:
 *             # sub-daily offset - use timedelta (tz-aware)
 *             offset = timedelta(**kwds_no_nanos)             # <<<<<<<<<<<<<<
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):
 *         offset = timedelta(days=0)
 */
    /*else*/ {
      if (unlikely(__pyx_cur_scope->__pyx_v_kwds_no_nanos == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 329, __pyx_L1_error)
      }
      __pyx_t_6 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwds_no_nanos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_offset = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L4:;

    /* "pandas/_libs/tslibs/offsets.pyx":316
 * 
 *     use_relativedelta = False
 *     if len(kwds_no_nanos) > 0:             # <<<<<<<<<<<<<<
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 *             if "millisecond" in kwds_no_nanos:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":330
 *             # sub-daily offset - use timedelta (tz-aware)
 *             offset = timedelta(**kwds_no_nanos)
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):             # <<<<<<<<<<<<<<
 *         offset = timedelta(days=0)
 *     else:
 */
  __pyx_t_2 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_6genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":331
 *             offset = timedelta(**kwds_no_nanos)
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):
 *         offset = timedelta(days=0)             # <<<<<<<<<<<<<<
 *     else:
 *         # GH 45643/45890: (historically) defaults to 1 day for non-nano
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_days, __pyx_int_0) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_offset = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":330
 *             # sub-daily offset - use timedelta (tz-aware)
 *             offset = timedelta(**kwds_no_nanos)
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):             # <<<<<<<<<<<<<<
 *         offset = timedelta(days=0)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":335
 *         # GH 45643/45890: (historically) defaults to 1 day for non-nano
 *         # since datetime.timedelta doesn't handle nanoseconds
 *         offset = timedelta(days=1)             # <<<<<<<<<<<<<<
 *     return offset, use_relativedelta
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_days, __pyx_int_1) < 0) __PYX_ERR(0, 335, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_offset = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":336
 *         # since datetime.timedelta doesn't handle nanoseconds
 *         offset = timedelta(days=1)
 *     return offset, use_relativedelta             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_use_relativedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset);
  __Pyx_GIVEREF(__pyx_v_offset);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_offset);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":300
 * 
 * 
 * cdef _determine_offset(kwds):             # <<<<<<<<<<<<<<
 *     # timedelta is used for sub-daily plural offsets and all singular
 *     # offsets, relativedelta is used for plural offsets of daily length or
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._determine_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_2generator);
  __Pyx_XDECREF(__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_5generator1);
  __Pyx_XDECREF(__pyx_gb_6pandas_5_libs_6tslibs_7offsets_17_determine_offset_8generator2);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":369
 *     #    dict _cache
 * 
 *     def __init__(self, n=1, normalize=False):             # <<<<<<<<<<<<<<
 *         n = self._validate_n(n)
 *         self.n = n
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 369, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_n);

  /* "pandas/_libs/tslibs/offsets.pyx":370
 * 
 *     def __init__(self, n=1, normalize=False):
 *         n = self._validate_n(n)             # <<<<<<<<<<<<<<
 *         self.n = n
 *         """
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":371
 *     def __init__(self, n=1, normalize=False):
 *         n = self._validate_n(n)
 *         self.n = n             # <<<<<<<<<<<<<<
 *         """
 *         Number of multiples of the frequency.
 */
  __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_v_n); if (unlikely((__pyx_t_4 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error)
  __pyx_v_self->n = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":380
 *         5
 *         """
 *         self.normalize = normalize             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether the frequency can align with midnight.
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_normalize); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L1_error)
  __pyx_v_self->normalize = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":389
 *         False
 *         """
 *         self._cache = {}             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other) -> bool:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_cache);
  __Pyx_DECREF(__pyx_v_self->_cache);
  __pyx_v_self->_cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":369
 *     #    dict _cache
 * 
 *     def __init__(self, n=1, normalize=False):             # <<<<<<<<<<<<<<
 *         n = self._validate_n(n)
 *         self.n = n
 */

  /* 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_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":391
 *         self._cache = {}
 * 
 *     def __eq__(self, other) -> bool:             # <<<<<<<<<<<<<<
 *         if isinstance(other, str):
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_2__eq__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_2__eq__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":392
 * 
 *     def __eq__(self, other) -> bool:
 *         if isinstance(other, str):             # <<<<<<<<<<<<<<
 *             try:
 *                 # GH#23524 if to_offset fails, we are dealing with an
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_other); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":393
 *     def __eq__(self, other) -> bool:
 *         if isinstance(other, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":396
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 *                 other = to_offset(other)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 # e.g. "infer"
 */
        __pyx_t_6 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_to_offset(__pyx_v_other, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":393
 *     def __eq__(self, other) -> bool:
 *         if isinstance(other, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":397
 *                 #  incomparable type so == is False and != is True
 *                 other = to_offset(other)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 # e.g. "infer"
 *                 return False
 */
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 397, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_9);

        /* "pandas/_libs/tslibs/offsets.pyx":399
 *             except ValueError:
 *                 # e.g. "infer"
 *                 return False             # <<<<<<<<<<<<<<
 *         try:
 *             return self._params == other._params
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "pandas/_libs/tslibs/offsets.pyx":393
 *     def __eq__(self, other) -> bool:
 *         if isinstance(other, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":392
 * 
 *     def __eq__(self, other) -> bool:
 *         if isinstance(other, str):             # <<<<<<<<<<<<<<
 *             try:
 *                 # GH#23524 if to_offset fails, we are dealing with an
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":400
 *                 # e.g. "infer"
 *                 return False
 *         try:             # <<<<<<<<<<<<<<
 *             return self._params == other._params
 *         except AttributeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":401
 *                 return False
 *         try:
 *             return self._params == other._params             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             # other is not a DateOffset object
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_params); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 401, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_params); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 401, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_9, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L12_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L16_try_return;

      /* "pandas/_libs/tslibs/offsets.pyx":400
 *                 # e.g. "infer"
 *                 return False
 *         try:             # <<<<<<<<<<<<<<
 *             return self._params == other._params
 *         except AttributeError:
 */
    }
    __pyx_L12_error:;
    __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;

    /* "pandas/_libs/tslibs/offsets.pyx":402
 *         try:
 *             return self._params == other._params
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             # other is not a DateOffset object
 *             return False
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 402, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_9);

      /* "pandas/_libs/tslibs/offsets.pyx":404
 *         except AttributeError:
 *             # other is not a DateOffset object
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, other):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L15_except_return;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":400
 *                 # e.g. "infer"
 *                 return False
 *         try:             # <<<<<<<<<<<<<<
 *             return self._params == other._params
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L16_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L15_except_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":391
 *         self._cache = {}
 * 
 *     def __eq__(self, other) -> bool:             # <<<<<<<<<<<<<<
 *         if isinstance(other, str):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":406
 *             return False
 * 
 *     def __ne__(self, other):             # <<<<<<<<<<<<<<
 *         return not self == other
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4__ne__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":407
 * 
 *     def __ne__(self, other):
 *         return not self == other             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self), __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":406
 *             return False
 * 
 *     def __ne__(self, other):             # <<<<<<<<<<<<<<
 *         return not self == other
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":409
 *         return not self == other
 * 
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return hash(self._params)
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6__hash__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":410
 * 
 *     def __hash__(self) -> int:
 *         return hash(self._params)             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":409
 *         return not self == other
 * 
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return hash(self._params)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":413
 * 
 *     @cache_readonly
 *     def _params(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple containing all of the attributes needed to evaluate
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9_params(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_8_params[] = "\n        Returns a tuple containing all of the attributes needed to evaluate\n        equality between two DateOffset objects.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9_params(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_params (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_8_params(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_8_params(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_v_all_paras = NULL;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_exclude = NULL;
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_params = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_k = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_params", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":418
 *         equality between two DateOffset objects.
 *         """
 *         d = getattr(self, "__dict__", {})             # <<<<<<<<<<<<<<
 *         all_paras = d.copy()
 *         all_paras["n"] = self.n
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_u_dict, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_d = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":419
 *         """
 *         d = getattr(self, "__dict__", {})
 *         all_paras = d.copy()             # <<<<<<<<<<<<<<
 *         all_paras["n"] = self.n
 *         all_paras["normalize"] = self.normalize
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_all_paras = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":420
 *         d = getattr(self, "__dict__", {})
 *         all_paras = d.copy()
 *         all_paras["n"] = self.n             # <<<<<<<<<<<<<<
 *         all_paras["normalize"] = self.normalize
 *         for attr in self._attributes:
 */
  __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(PyObject_SetItem(__pyx_v_all_paras, __pyx_n_u_n, __pyx_t_2) < 0)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":421
 *         all_paras = d.copy()
 *         all_paras["n"] = self.n
 *         all_paras["normalize"] = self.normalize             # <<<<<<<<<<<<<<
 *         for attr in self._attributes:
 *             if hasattr(self, attr) and attr not in d:
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(PyObject_SetItem(__pyx_v_all_paras, __pyx_n_u_normalize, __pyx_t_2) < 0)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":422
 *         all_paras["n"] = self.n
 *         all_paras["normalize"] = self.normalize
 *         for attr in self._attributes:             # <<<<<<<<<<<<<<
 *             if hasattr(self, attr) and attr not in d:
 *                 # cython attributes are not in __dict__
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 422, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 422, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":423
 *         all_paras["normalize"] = self.normalize
 *         for attr in self._attributes:
 *             if hasattr(self, attr) and attr not in d:             # <<<<<<<<<<<<<<
 *                 # cython attributes are not in __dict__
 *                 all_paras[attr] = getattr(self, attr)
 */
    __pyx_t_7 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_attr); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 423, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_attr, __pyx_v_d, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 423, __pyx_L1_error)
    __pyx_t_7 = (__pyx_t_8 != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_6) {

      /* "pandas/_libs/tslibs/offsets.pyx":425
 *             if hasattr(self, attr) and attr not in d:
 *                 # cython attributes are not in __dict__
 *                 all_paras[attr] = getattr(self, attr)             # <<<<<<<<<<<<<<
 * 
 *         if 'holidays' in all_paras and not all_paras['holidays']:
 */
      __pyx_t_2 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_v_all_paras, __pyx_v_attr, __pyx_t_2) < 0)) __PYX_ERR(0, 425, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":423
 *         all_paras["normalize"] = self.normalize
 *         for attr in self._attributes:
 *             if hasattr(self, attr) and attr not in d:             # <<<<<<<<<<<<<<
 *                 # cython attributes are not in __dict__
 *                 all_paras[attr] = getattr(self, attr)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":422
 *         all_paras["n"] = self.n
 *         all_paras["normalize"] = self.normalize
 *         for attr in self._attributes:             # <<<<<<<<<<<<<<
 *             if hasattr(self, attr) and attr not in d:
 *                 # cython attributes are not in __dict__
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":427
 *                 all_paras[attr] = getattr(self, attr)
 * 
 *         if 'holidays' in all_paras and not all_paras['holidays']:             # <<<<<<<<<<<<<<
 *             all_paras.pop('holidays')
 *         exclude = ['kwds', 'name', 'calendar']
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_holidays, __pyx_v_all_paras, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_paras, __pyx_n_u_holidays); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((!__pyx_t_8) != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":428
 * 
 *         if 'holidays' in all_paras and not all_paras['holidays']:
 *             all_paras.pop('holidays')             # <<<<<<<<<<<<<<
 *         exclude = ['kwds', 'name', 'calendar']
 *         attrs = [(k, v) for k, v in all_paras.items()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_paras, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_holidays) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_holidays);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":427
 *                 all_paras[attr] = getattr(self, attr)
 * 
 *         if 'holidays' in all_paras and not all_paras['holidays']:             # <<<<<<<<<<<<<<
 *             all_paras.pop('holidays')
 *         exclude = ['kwds', 'name', 'calendar']
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":429
 *         if 'holidays' in all_paras and not all_paras['holidays']:
 *             all_paras.pop('holidays')
 *         exclude = ['kwds', 'name', 'calendar']             # <<<<<<<<<<<<<<
 *         attrs = [(k, v) for k, v in all_paras.items()
 *                  if (k not in exclude) and (k[0] != '_')]
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_kwds);
  __Pyx_GIVEREF(__pyx_n_u_kwds);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_kwds);
  __Pyx_INCREF(__pyx_n_u_name_2);
  __Pyx_GIVEREF(__pyx_n_u_name_2);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_name_2);
  __Pyx_INCREF(__pyx_n_u_calendar);
  __Pyx_GIVEREF(__pyx_n_u_calendar);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_calendar);
  __pyx_v_exclude = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":430
 *             all_paras.pop('holidays')
 *         exclude = ['kwds', 'name', 'calendar']
 *         attrs = [(k, v) for k, v in all_paras.items()             # <<<<<<<<<<<<<<
 *                  if (k not in exclude) and (k[0] != '_')]
 *         attrs = sorted(set(attrs))
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 0;
    if (unlikely(__pyx_v_all_paras == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 430, __pyx_L13_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_all_paras, 0, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_9, &__pyx_t_4, &__pyx_t_3, &__pyx_t_11, NULL, __pyx_t_10);
      if (unlikely(__pyx_t_12 == 0)) break;
      if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 430, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_k, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_v, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":431
 *         exclude = ['kwds', 'name', 'calendar']
 *         attrs = [(k, v) for k, v in all_paras.items()
 *                  if (k not in exclude) and (k[0] != '_')]             # <<<<<<<<<<<<<<
 *         attrs = sorted(set(attrs))
 *         params = tuple([str(type(self))] + attrs)
 */
      __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr4__pyx_v_k, __pyx_v_exclude, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 431, __pyx_L13_error)
      __pyx_t_8 = (__pyx_t_7 != 0);
      if (__pyx_t_8) {
      } else {
        __pyx_t_6 = __pyx_t_8;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_8genexpr4__pyx_v_k, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 431, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u__11, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L13_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_6 = __pyx_t_8;
      __pyx_L17_bool_binop_done:;
      if (__pyx_t_6) {

        /* "pandas/_libs/tslibs/offsets.pyx":430
 *             all_paras.pop('holidays')
 *         exclude = ['kwds', 'name', 'calendar']
 *         attrs = [(k, v) for k, v in all_paras.items()             # <<<<<<<<<<<<<<
 *                  if (k not in exclude) and (k[0] != '_')]
 *         attrs = sorted(set(attrs))
 */
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 430, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_8genexpr4__pyx_v_k);
        __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_k);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_8genexpr4__pyx_v_k);
        __Pyx_INCREF(__pyx_8genexpr4__pyx_v_v);
        __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_v);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_8genexpr4__pyx_v_v);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 430, __pyx_L13_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":431
 *         exclude = ['kwds', 'name', 'calendar']
 *         attrs = [(k, v) for k, v in all_paras.items()
 *                  if (k not in exclude) and (k[0] != '_')]             # <<<<<<<<<<<<<<
 *         attrs = sorted(set(attrs))
 *         params = tuple([str(type(self))] + attrs)
 */
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); __pyx_8genexpr4__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __pyx_8genexpr4__pyx_v_v = 0;
    goto __pyx_L19_exit_scope;
    __pyx_L13_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); __pyx_8genexpr4__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __pyx_8genexpr4__pyx_v_v = 0;
    goto __pyx_L1_error;
    __pyx_L19_exit_scope:;
  } /* exit inner scope */
  __pyx_v_attrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":432
 *         attrs = [(k, v) for k, v in all_paras.items()
 *                  if (k not in exclude) and (k[0] != '_')]
 *         attrs = sorted(set(attrs))             # <<<<<<<<<<<<<<
 *         params = tuple([str(type(self))] + attrs)
 *         return params
 */
  __pyx_t_2 = PySet_New(__pyx_v_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_13 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_attrs, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":433
 *                  if (k not in exclude) and (k[0] != '_')]
 *         attrs = sorted(set(attrs))
 *         params = tuple([str(type(self))] + attrs)             # <<<<<<<<<<<<<<
 *         return params
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_11, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":434
 *         attrs = sorted(set(attrs))
 *         params = tuple([str(type(self))] + attrs)
 *         return params             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_params);
  __pyx_r = __pyx_v_params;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":413
 * 
 *     @cache_readonly
 *     def _params(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple containing all of the attributes needed to evaluate
 */

  /* 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_11);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_all_paras);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_exclude);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":437
 * 
 *     @property
 *     def kwds(self) -> dict:             # <<<<<<<<<<<<<<
 *         """
 *         Return a dict of extra parameters for the offset.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4kwds_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4kwds_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4kwds___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4kwds___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_v_kwds = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_name = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":453
 *         """
 *         # for backwards-compatibility
 *         kwds = {name: getattr(self, name, None) for name in self._attributes             # <<<<<<<<<<<<<<
 *                 if name not in ["n", "normalize"]}
 *         return {name: kwds[name] for name in kwds if kwds[name] is not None}
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 453, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 453, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 453, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_name, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":454
 *         # for backwards-compatibility
 *         kwds = {name: getattr(self, name, None) for name in self._attributes
 *                 if name not in ["n", "normalize"]}             # <<<<<<<<<<<<<<
 *         return {name: kwds[name] for name in kwds if kwds[name] is not None}
 * 
 */
      __Pyx_INCREF(__pyx_8genexpr5__pyx_v_name);
      __pyx_t_2 = __pyx_8genexpr5__pyx_v_name;
      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_n, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 454, __pyx_L5_error)
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_normalize, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 454, __pyx_L5_error)
      __pyx_t_6 = __pyx_t_7;
      __pyx_L9_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = (__pyx_t_6 != 0);
      if (__pyx_t_7) {

        /* "pandas/_libs/tslibs/offsets.pyx":453
 *         """
 *         # for backwards-compatibility
 *         kwds = {name: getattr(self, name, None) for name in self._attributes             # <<<<<<<<<<<<<<
 *                 if name not in ["n", "normalize"]}
 *         return {name: kwds[name] for name in kwds if kwds[name] is not None}
 */
        __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_8genexpr5__pyx_v_name, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_name, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 453, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":454
 *         # for backwards-compatibility
 *         kwds = {name: getattr(self, name, None) for name in self._attributes
 *                 if name not in ["n", "normalize"]}             # <<<<<<<<<<<<<<
 *         return {name: kwds[name] for name in kwds if kwds[name] is not None}
 * 
 */
      }

      /* "pandas/_libs/tslibs/offsets.pyx":453
 *         """
 *         # for backwards-compatibility
 *         kwds = {name: getattr(self, name, None) for name in self._attributes             # <<<<<<<<<<<<<<
 *                 if name not in ["n", "normalize"]}
 *         return {name: kwds[name] for name in kwds if kwds[name] is not None}
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_name); __pyx_8genexpr5__pyx_v_name = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_name); __pyx_8genexpr5__pyx_v_name = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_v_kwds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":455
 *         kwds = {name: getattr(self, name, None) for name in self._attributes
 *                 if name not in ["n", "normalize"]}
 *         return {name: kwds[name] for name in kwds if kwds[name] is not None}             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_kwds, 1, ((PyObject *)NULL), (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
    while (1) {
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_8, &__pyx_t_4, &__pyx_t_2, NULL, NULL, __pyx_t_9);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 455, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_name, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_8genexpr6__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = (__pyx_t_2 != Py_None);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = (__pyx_t_7 != 0);
      if (__pyx_t_6) {
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_8genexpr6__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr6__pyx_v_name, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 455, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_name); __pyx_8genexpr6__pyx_v_name = 0;
    goto __pyx_L18_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_name); __pyx_8genexpr6__pyx_v_name = 0;
    goto __pyx_L1_error;
    __pyx_L18_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":437
 * 
 *     @property
 *     def kwds(self) -> dict:             # <<<<<<<<<<<<<<
 *         """
 *         Return a dict of extra parameters for the offset.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.kwds.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_name);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":458
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the calling offset object with n=1 and all other
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4base___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":463
 *         attributes equal.
 *         """
 *         return type(self)(n=1, normalize=self.normalize, **self.kwds)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_n, __pyx_int_1) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalize, __pyx_t_3) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 463, __pyx_L1_error)
  }
  if (__Pyx_MergeKeywords(__pyx_t_1, __pyx_t_2) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":458
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the calling offset object with n=1 and all other
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":465
 *         return type(self)(n=1, normalize=self.normalize, **self.kwds)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, BaseOffset):
 *             # cython semantics; this is __radd__
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_10__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_8genexpr7__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":466
 * 
 *     def __add__(self, other):
 *         if not isinstance(self, BaseOffset):             # <<<<<<<<<<<<<<
 *             # cython semantics; this is __radd__
 *             # TODO(cython3): remove this, this moved to __radd__
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":469
 *             # cython semantics; this is __radd__
 *             # TODO(cython3): remove this, this moved to __radd__
 *             return other.__add__(self)             # <<<<<<<<<<<<<<
 * 
 *         elif util.is_array(other) and other.dtype == object:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":466
 * 
 *     def __add__(self, other):
 *         if not isinstance(self, BaseOffset):             # <<<<<<<<<<<<<<
 *             # cython semantics; this is __radd__
 *             # TODO(cython3): remove this, this moved to __radd__
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":471
 *             return other.__add__(self)
 * 
 *         elif util.is_array(other) and other.dtype == object:             # <<<<<<<<<<<<<<
 *             return np.array([self + x for x in other])
 * 
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_array(__pyx_v_other) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_object, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __pyx_t_1;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":472
 * 
 *         elif util.is_array(other) and other.dtype == object:
 *             return np.array([self + x for x in other])             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
        __pyx_t_6 = __pyx_v_other; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 472, __pyx_L8_error)
      }
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 472, __pyx_L8_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 472, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 472, __pyx_L8_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 472, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          }
        } else {
          __pyx_t_9 = __pyx_t_8(__pyx_t_6);
          if (unlikely(!__pyx_t_9)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 472, __pyx_L8_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_9);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_x, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_9 = PyNumber_Add(__pyx_v_self, __pyx_8genexpr7__pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 472, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 472, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_x); __pyx_8genexpr7__pyx_v_x = 0;
      goto __pyx_L11_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_x); __pyx_8genexpr7__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L11_exit_scope:;
    } /* exit inner scope */
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":471
 *             return other.__add__(self)
 * 
 *         elif util.is_array(other) and other.dtype == object:             # <<<<<<<<<<<<<<
 *             return np.array([self + x for x in other])
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":474
 *             return np.array([self + x for x in other])
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self._apply(other)
 *         except ApplyTypeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":475
 * 
 *         try:
 *             return self._apply(other)             # <<<<<<<<<<<<<<
 *         except ApplyTypeError:
 *             return NotImplemented
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_apply); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_other);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L16_try_return;

      /* "pandas/_libs/tslibs/offsets.pyx":474
 *             return np.array([self + x for x in other])
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self._apply(other)
 *         except ApplyTypeError:
 */
    }
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":476
 *         try:
 *             return self._apply(other)
 *         except ApplyTypeError:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ApplyTypeError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L14_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_3);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0;
    if (__pyx_t_13) {
      __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 476, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);

      /* "pandas/_libs/tslibs/offsets.pyx":477
 *             return self._apply(other)
 *         except ApplyTypeError:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __radd__(self, other):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      __Pyx_DECREF(__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;
      goto __pyx_L15_except_return;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":474
 *             return np.array([self + x for x in other])
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self._apply(other)
 *         except ApplyTypeError:
 */
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L1_error;
    __pyx_L16_try_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L0;
    __pyx_L15_except_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":465
 *         return type(self)(n=1, normalize=self.normalize, **self.kwds)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, BaseOffset):
 *             # cython semantics; this is __radd__
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":479
 *             return NotImplemented
 * 
 *     def __radd__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__add__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_13__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_13__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_12__radd__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":480
 * 
 *     def __radd__(self, other):
 *         return self.__add__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":479
 *             return NotImplemented
 * 
 *     def __radd__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__add__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":482
 *         return self.__add__(other)
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         if PyDateTime_Check(other):
 *             raise TypeError('Cannot subtract datetime from offset.')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_15__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_15__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_14__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":483
 * 
 *     def __sub__(self, other):
 *         if PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             raise TypeError('Cannot subtract datetime from offset.')
 *         elif type(other) == type(self):
 */
  __pyx_t_1 = (PyDateTime_Check(__pyx_v_other) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":484
 *     def __sub__(self, other):
 *         if PyDateTime_Check(other):
 *             raise TypeError('Cannot subtract datetime from offset.')             # <<<<<<<<<<<<<<
 *         elif type(other) == type(self):
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 484, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":483
 * 
 *     def __sub__(self, other):
 *         if PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             raise TypeError('Cannot subtract datetime from offset.')
 *         elif type(other) == type(self):
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":485
 *         if PyDateTime_Check(other):
 *             raise TypeError('Cannot subtract datetime from offset.')
 *         elif type(other) == type(self):             # <<<<<<<<<<<<<<
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 *                               **self.kwds)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_other)), ((PyObject *)Py_TYPE(__pyx_v_self)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":486
 *             raise TypeError('Cannot subtract datetime from offset.')
 *         elif type(other) == type(self):
 *             return type(self)(self.n - other.n, normalize=self.normalize,             # <<<<<<<<<<<<<<
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalize, __pyx_t_5) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":487
 *         elif type(other) == type(self):
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 *                               **self.kwds)             # <<<<<<<<<<<<<<
 *         elif not isinstance(self, BaseOffset):
 *             # TODO(cython3): remove, this moved to __rsub__
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kwds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 487, __pyx_L1_error)
    }
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_t_2) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":486
 *             raise TypeError('Cannot subtract datetime from offset.')
 *         elif type(other) == type(self):
 *             return type(self)(self.n - other.n, normalize=self.normalize,             # <<<<<<<<<<<<<<
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)Py_TYPE(__pyx_v_self)), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":485
 *         if PyDateTime_Check(other):
 *             raise TypeError('Cannot subtract datetime from offset.')
 *         elif type(other) == type(self):             # <<<<<<<<<<<<<<
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 *                               **self.kwds)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":488
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):             # <<<<<<<<<<<<<<
 *             # TODO(cython3): remove, this moved to __rsub__
 *             # cython semantics, this is __rsub__
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_t_6 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":491
 *             # TODO(cython3): remove, this moved to __rsub__
 *             # cython semantics, this is __rsub__
 *             return (-other).__add__(self)             # <<<<<<<<<<<<<<
 *         else:
 *             # e.g. PeriodIndex
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":488
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):             # <<<<<<<<<<<<<<
 *             # TODO(cython3): remove, this moved to __rsub__
 *             # cython semantics, this is __rsub__
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":494
 *         else:
 *             # e.g. PeriodIndex
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __rsub__(self, other):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":482
 *         return self.__add__(other)
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         if PyDateTime_Check(other):
 *             raise TypeError('Cannot subtract datetime from offset.')
 */

  /* 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("pandas._libs.tslibs.offsets.BaseOffset.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":496
 *             return NotImplemented
 * 
 *     def __rsub__(self, other):             # <<<<<<<<<<<<<<
 *         return (-self).__add__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_17__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_17__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_16__rsub__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":497
 * 
 *     def __rsub__(self, other):
 *         return (-self).__add__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyNumber_Negative(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":496
 *             return NotImplemented
 * 
 *     def __rsub__(self, other):             # <<<<<<<<<<<<<<
 *         return (-self).__add__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":499
 *         return (-self).__add__(other)
 * 
 *     def __call__(self, other):             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "DateOffset.__call__ is deprecated and will be removed in a future "
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_other = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 499, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_other = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 499, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_18__call__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), __pyx_v_other);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_18__call__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":500
 * 
 *     def __call__(self, other):
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "DateOffset.__call__ is deprecated and will be removed in a future "
 *             "version.  Use `offset + other` instead.",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":504
 *             "version.  Use `offset + other` instead.",
 *             FutureWarning,
 *             stacklevel=find_stack_level(),             # <<<<<<<<<<<<<<
 *         )
 *         return self._apply(other)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_find_stack_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stacklevel, __pyx_t_3) < 0) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":500
 * 
 *     def __call__(self, other):
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "DateOffset.__call__ is deprecated and will be removed in a future "
 *             "version.  Use `offset + other` instead.",
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":506
 *             stacklevel=find_stack_level(),
 *         )
 *         return self._apply(other)             # <<<<<<<<<<<<<<
 * 
 *     def apply(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":499
 *         return (-self).__add__(other)
 * 
 *     def __call__(self, other):             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "DateOffset.__call__ is deprecated and will be removed in a future "
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":508
 *         return self._apply(other)
 * 
 *     def apply(self, other):             # <<<<<<<<<<<<<<
 *         # GH#44522
 *         warnings.warn(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_21apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_21apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_20apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_20apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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("apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":510
 *     def apply(self, other):
 *         # GH#44522
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             f"{type(self).__name__}.apply is deprecated and will be removed "
 *             "in a future version. Use `offset + other` instead",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":511
 *         # GH#44522
 *         warnings.warn(
 *             f"{type(self).__name__}.apply is deprecated and will be removed "             # <<<<<<<<<<<<<<
 *             "in a future version. Use `offset + other` instead",
 *             FutureWarning,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u_apply_is_deprecated_and_will_be); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":510
 *     def apply(self, other):
 *         # GH#44522
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             f"{type(self).__name__}.apply is deprecated and will be removed "
 *             "in a future version. Use `offset + other` instead",
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_FutureWarning);
  __Pyx_GIVEREF(__pyx_builtin_FutureWarning);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_builtin_FutureWarning);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":514
 *             "in a future version. Use `offset + other` instead",
 *             FutureWarning,
 *             stacklevel=find_stack_level(),             # <<<<<<<<<<<<<<
 *         )
 *         return self._apply(other)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_find_stack_level); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stacklevel, __pyx_t_4) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":510
 *     def apply(self, other):
 *         # GH#44522
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             f"{type(self).__name__}.apply is deprecated and will be removed "
 *             "in a future version. Use `offset + other` instead",
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":516
 *             stacklevel=find_stack_level(),
 *         )
 *         return self._apply(other)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":508
 *         return self._apply(other)
 * 
 *     def apply(self, other):             # <<<<<<<<<<<<<<
 *         # GH#44522
 *         warnings.warn(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":518
 *         return self._apply(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         if util.is_array(other):
 *             return np.array([self * x for x in other])
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_23__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_23__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_22__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_22__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_8genexpr8__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":519
 * 
 *     def __mul__(self, other):
 *         if util.is_array(other):             # <<<<<<<<<<<<<<
 *             return np.array([self * x for x in other])
 *         elif is_integer_object(other):
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_array(__pyx_v_other) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":520
 *     def __mul__(self, other):
 *         if util.is_array(other):
 *             return np.array([self * x for x in other])             # <<<<<<<<<<<<<<
 *         elif is_integer_object(other):
 *             return type(self)(n=other * self.n, normalize=self.normalize,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
        __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 520, __pyx_L6_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 520, __pyx_L6_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 520, __pyx_L6_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_7(__pyx_t_5);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 520, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_x, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = PyNumber_Multiply(__pyx_v_self, __pyx_8genexpr8__pyx_v_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 520, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":519
 * 
 *     def __mul__(self, other):
 *         if util.is_array(other):             # <<<<<<<<<<<<<<
 *             return np.array([self * x for x in other])
 *         elif is_integer_object(other):
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":521
 *         if util.is_array(other):
 *             return np.array([self * x for x in other])
 *         elif is_integer_object(other):             # <<<<<<<<<<<<<<
 *             return type(self)(n=other * self.n, normalize=self.normalize,
 *                               **self.kwds)
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_integer_object(__pyx_v_other) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":522
 *             return np.array([self * x for x in other])
 *         elif is_integer_object(other):
 *             return type(self)(n=other * self.n, normalize=self.normalize,             # <<<<<<<<<<<<<<
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_other, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_n, __pyx_t_5) < 0) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_normalize, __pyx_t_5) < 0) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":523
 *         elif is_integer_object(other):
 *             return type(self)(n=other * self.n, normalize=self.normalize,
 *                               **self.kwds)             # <<<<<<<<<<<<<<
 *         elif not isinstance(self, BaseOffset):
 *             # TODO(cython3): remove this, this moved to __rmul__
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kwds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__pyx_t_4 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 523, __pyx_L1_error)
    }
    if (__Pyx_MergeKeywords(__pyx_t_2, __pyx_t_4) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":522
 *             return np.array([self * x for x in other])
 *         elif is_integer_object(other):
 *             return type(self)(n=other * self.n, normalize=self.normalize,             # <<<<<<<<<<<<<<
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)Py_TYPE(__pyx_v_self)), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":521
 *         if util.is_array(other):
 *             return np.array([self * x for x in other])
 *         elif is_integer_object(other):             # <<<<<<<<<<<<<<
 *             return type(self)(n=other * self.n, normalize=self.normalize,
 *                               **self.kwds)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":524
 *             return type(self)(n=other * self.n, normalize=self.normalize,
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):             # <<<<<<<<<<<<<<
 *             # TODO(cython3): remove this, this moved to __rmul__
 *             # cython semantics, this is __rmul__
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_t_9 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_9) {

    /* "pandas/_libs/tslibs/offsets.pyx":527
 *             # TODO(cython3): remove this, this moved to __rmul__
 *             # cython semantics, this is __rmul__
 *             return other.__mul__(self)             # <<<<<<<<<<<<<<
 *         return NotImplemented
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":524
 *             return type(self)(n=other * self.n, normalize=self.normalize,
 *                               **self.kwds)
 *         elif not isinstance(self, BaseOffset):             # <<<<<<<<<<<<<<
 *             # TODO(cython3): remove this, this moved to __rmul__
 *             # cython semantics, this is __rmul__
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":528
 *             # cython semantics, this is __rmul__
 *             return other.__mul__(self)
 *         return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __rmul__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_builtin_NotImplemented);
  __pyx_r = __pyx_builtin_NotImplemented;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":518
 *         return self._apply(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         if util.is_array(other):
 *             return np.array([self * x for x in other])
 */

  /* 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_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":530
 *         return NotImplemented
 * 
 *     def __rmul__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__mul__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_25__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_25__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_24__rmul__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":531
 * 
 *     def __rmul__(self, other):
 *         return self.__mul__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __neg__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":530
 *         return NotImplemented
 * 
 *     def __rmul__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__mul__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":533
 *         return self.__mul__(other)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<<
 *         # Note: we are deferring directly to __mul__ instead of __rmul__, as
 *         # that allows us to use methods that can go in a `cdef class`
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_27__neg__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_27__neg__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_26__neg__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":536
 *         # Note: we are deferring directly to __mul__ instead of __rmul__, as
 *         # that allows us to use methods that can go in a `cdef class`
 *         return self * -1             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_v_self), __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":533
 *         return self.__mul__(other)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<<
 *         # Note: we are deferring directly to __mul__ instead of __rmul__, as
 *         # that allows us to use methods that can go in a `cdef class`
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":538
 *         return self * -1
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         # Note: we are deferring directly to __mul__ instead of __rmul__, as
 *         # that allows us to use methods that can go in a `cdef class`
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_29copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_28copy[] = "\n        Return a copy of the frequency.\n\n        Examples\n        --------\n        >>> freq = pd.DateOffset(1)\n        >>> freq_copy = freq.copy()\n        >>> freq is freq_copy\n        False\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_29copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_28copy(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":551
 *         False
 *         """
 *         return self * 1             # <<<<<<<<<<<<<<
 * 
 *     # ------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_v_self), __pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":538
 *         return self * -1
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         # Note: we are deferring directly to __mul__ instead of __rmul__, as
 *         # that allows us to use methods that can go in a `cdef class`
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":556
 *     # Name and Rendering Methods
 * 
 *     def __repr__(self) -> str:             # <<<<<<<<<<<<<<
 *         # _output_name used by B(Year|Quarter)(End|Begin) to
 *         #  expand "B" -> "Business"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_30__repr__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_30__repr__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_v_class_name = NULL;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_v_n_str = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":559
 *         # _output_name used by B(Year|Quarter)(End|Begin) to
 *         #  expand "B" -> "Business"
 *         class_name = getattr(self, "_output_name", type(self).__name__)             # <<<<<<<<<<<<<<
 * 
 *         if abs(self.n) != 1:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_u_output_name, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_class_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":561
 *         class_name = getattr(self, "_output_name", type(self).__name__)
 * 
 *         if abs(self.n) != 1:             # <<<<<<<<<<<<<<
 *             plural = "s"
 *         else:
 */
  __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":562
 * 
 *         if abs(self.n) != 1:
 *             plural = "s"             # <<<<<<<<<<<<<<
 *         else:
 *             plural = ""
 */
    __Pyx_INCREF(__pyx_n_u_s);
    __pyx_v_plural = __pyx_n_u_s;

    /* "pandas/_libs/tslibs/offsets.pyx":561
 *         class_name = getattr(self, "_output_name", type(self).__name__)
 * 
 *         if abs(self.n) != 1:             # <<<<<<<<<<<<<<
 *             plural = "s"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":564
 *             plural = "s"
 *         else:
 *             plural = ""             # <<<<<<<<<<<<<<
 * 
 *         n_str = ""
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_u__14);
    __pyx_v_plural = __pyx_kp_u__14;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":566
 *             plural = ""
 * 
 *         n_str = ""             # <<<<<<<<<<<<<<
 *         if self.n != 1:
 *             n_str = f"{self.n} * "
 */
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_v_n_str = __pyx_kp_u__14;

  /* "pandas/_libs/tslibs/offsets.pyx":567
 * 
 *         n_str = ""
 *         if self.n != 1:             # <<<<<<<<<<<<<<
 *             n_str = f"{self.n} * "
 * 
 */
  __pyx_t_3 = ((__pyx_v_self->n != 1) != 0);
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":568
 *         n_str = ""
 *         if self.n != 1:
 *             n_str = f"{self.n} * "             # <<<<<<<<<<<<<<
 * 
 *         out = f"<{n_str}{class_name}{plural}{self._repr_attrs()}>"
 */
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_n_str, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":567
 * 
 *         n_str = ""
 *         if self.n != 1:             # <<<<<<<<<<<<<<
 *             n_str = f"{self.n} * "
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":570
 *             n_str = f"{self.n} * "
 * 
 *         out = f"<{n_str}{class_name}{plural}{self._repr_attrs()}>"             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
  __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __Pyx_INCREF(__pyx_kp_u__16);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__16);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__16);
  __Pyx_INCREF(__pyx_v_n_str);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_n_str) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_n_str) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_n_str);
  __Pyx_GIVEREF(__pyx_v_n_str);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_n_str);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_class_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_v_plural);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_plural) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_plural) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_plural);
  __Pyx_GIVEREF(__pyx_v_plural);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_plural);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repr_attrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__17);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__17);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_kp_u__17);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":571
 * 
 *         out = f"<{n_str}{class_name}{plural}{self._repr_attrs()}>"
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def _repr_attrs(self) -> str:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":556
 *     # Name and Rendering Methods
 * 
 *     def __repr__(self) -> str:             # <<<<<<<<<<<<<<
 *         # _output_name used by B(Year|Quarter)(End|Begin) to
 *         #  expand "B" -> "Business"
 */

  /* 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_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_class_name);
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XDECREF(__pyx_v_n_str);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":573
 *         return out
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         exclude = {"n", "inc", "normalize"}
 *         attrs = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_33_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_33_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_attrs (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_32_repr_attrs(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_32_repr_attrs(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_v_exclude = NULL;
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr_attrs", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":574
 * 
 *     def _repr_attrs(self) -> str:
 *         exclude = {"n", "inc", "normalize"}             # <<<<<<<<<<<<<<
 *         attrs = []
 *         for attr in sorted(self._attributes):
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PySet_Add(__pyx_t_1, __pyx_n_u_n) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_inc) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_normalize) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
  __pyx_v_exclude = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":575
 *     def _repr_attrs(self) -> str:
 *         exclude = {"n", "inc", "normalize"}
 *         attrs = []             # <<<<<<<<<<<<<<
 *         for attr in sorted(self._attributes):
 *             # _attributes instead of __dict__ because cython attrs are not in __dict__
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_attrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":576
 *         exclude = {"n", "inc", "normalize"}
 *         attrs = []
 *         for attr in sorted(self._attributes):             # <<<<<<<<<<<<<<
 *             # _attributes instead of __dict__ because cython attrs are not in __dict__
 *             if attr.startswith("_") or attr == "kwds" or not hasattr(self, attr):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_4 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 576, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 576, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 576, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":578
 *         for attr in sorted(self._attributes):
 *             # _attributes instead of __dict__ because cython attrs are not in __dict__
 *             if attr.startswith("_") or attr == "kwds" or not hasattr(self, attr):             # <<<<<<<<<<<<<<
 *                 # DateOffset may not have some of these attributes
 *                 continue
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_n_u__11) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u__11);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_attr, __pyx_n_u_kwds, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 578, __pyx_L1_error)
    if (!__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_attr); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
    __pyx_t_9 = ((!(__pyx_t_8 != 0)) != 0);
    __pyx_t_6 = __pyx_t_9;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_6) {

      /* "pandas/_libs/tslibs/offsets.pyx":580
 *             if attr.startswith("_") or attr == "kwds" or not hasattr(self, attr):
 *                 # DateOffset may not have some of these attributes
 *                 continue             # <<<<<<<<<<<<<<
 *             elif attr not in exclude:
 *                 value = getattr(self, attr)
 */
      goto __pyx_L3_continue;

      /* "pandas/_libs/tslibs/offsets.pyx":578
 *         for attr in sorted(self._attributes):
 *             # _attributes instead of __dict__ because cython attrs are not in __dict__
 *             if attr.startswith("_") or attr == "kwds" or not hasattr(self, attr):             # <<<<<<<<<<<<<<
 *                 # DateOffset may not have some of these attributes
 *                 continue
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":581
 *                 # DateOffset may not have some of these attributes
 *                 continue
 *             elif attr not in exclude:             # <<<<<<<<<<<<<<
 *                 value = getattr(self, attr)
 *                 attrs.append(f"{attr}={value}")
 */
    __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_v_attr, __pyx_v_exclude, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 581, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_6 != 0);
    if (__pyx_t_9) {

      /* "pandas/_libs/tslibs/offsets.pyx":582
 *                 continue
 *             elif attr not in exclude:
 *                 value = getattr(self, attr)             # <<<<<<<<<<<<<<
 *                 attrs.append(f"{attr}={value}")
 * 
 */
      __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_attr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":583
 *             elif attr not in exclude:
 *                 value = getattr(self, attr)
 *                 attrs.append(f"{attr}={value}")             # <<<<<<<<<<<<<<
 * 
 *         out = ""
 */
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_attr, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_10 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__18);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_attrs, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":581
 *                 # DateOffset may not have some of these attributes
 *                 continue
 *             elif attr not in exclude:             # <<<<<<<<<<<<<<
 *                 value = getattr(self, attr)
 *                 attrs.append(f"{attr}={value}")
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":576
 *         exclude = {"n", "inc", "normalize"}
 *         attrs = []
 *         for attr in sorted(self._attributes):             # <<<<<<<<<<<<<<
 *             # _attributes instead of __dict__ because cython attrs are not in __dict__
 *             if attr.startswith("_") or attr == "kwds" or not hasattr(self, attr):
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":585
 *                 attrs.append(f"{attr}={value}")
 * 
 *         out = ""             # <<<<<<<<<<<<<<
 *         if attrs:
 *             out += ": " + ", ".join(attrs)
 */
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_v_out = __pyx_kp_u__14;

  /* "pandas/_libs/tslibs/offsets.pyx":586
 * 
 *         out = ""
 *         if attrs:             # <<<<<<<<<<<<<<
 *             out += ": " + ", ".join(attrs)
 *         return out
 */
  __pyx_t_9 = (PyList_GET_SIZE(__pyx_v_attrs) != 0);
  if (__pyx_t_9) {

    /* "pandas/_libs/tslibs/offsets.pyx":587
 *         out = ""
 *         if attrs:
 *             out += ": " + ", ".join(attrs)             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__20, __pyx_v_attrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u__19, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_v_out, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":586
 * 
 *         out = ""
 *         if attrs:             # <<<<<<<<<<<<<<
 *             out += ": " + ", ".join(attrs)
 *         return out
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":588
 *         if attrs:
 *             out += ": " + ", ".join(attrs)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":573
 *         return out
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         exclude = {"n", "inc", "normalize"}
 *         attrs = []
 */

  /* 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_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._repr_attrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_exclude);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":591
 * 
 *     @property
 *     def name(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Return a string representing the base frequency.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4name___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":603
 *         'H'
 *         """
 *         return self.rule_code             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rule_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":591
 * 
 *     @property
 *     def name(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Return a string representing the base frequency.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":606
 * 
 *     @property
 *     def _prefix(self) -> str:             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("Prefix not defined")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7_prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7_prefix_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7_prefix___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":607
 *     @property
 *     def _prefix(self) -> str:
 *         raise NotImplementedError("Prefix not defined")             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 607, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":606
 * 
 *     @property
 *     def _prefix(self) -> str:             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("Prefix not defined")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._prefix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":610
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         return self._prefix
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":611
 *     @property
 *     def rule_code(self) -> str:
 *         return self._prefix             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":610
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         return self._prefix
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":614
 * 
 *     @cache_readonly
 *     def freqstr(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Return a string representing the frequency.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_35freqstr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_34freqstr[] = "\n        Return a string representing the frequency.\n\n        Examples\n        --------\n        >>> pd.DateOffset(5).freqstr\n        '<5 * DateOffsets>'\n\n        >>> pd.offsets.BusinessHour(2).freqstr\n        '2BH'\n\n        >>> pd.offsets.Nano().freqstr\n        'N'\n\n        >>> pd.offsets.Nano(-3).freqstr\n        '-3N'\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_35freqstr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("freqstr (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_34freqstr(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_34freqstr(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_fstr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("freqstr", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":632
 *         '-3N'
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             code = self.rule_code
 *         except NotImplementedError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":633
 *         """
 *         try:
 *             code = self.rule_code             # <<<<<<<<<<<<<<
 *         except NotImplementedError:
 *             return str(repr(self))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rule_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_code = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":632
 *         '-3N'
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             code = self.rule_code
 *         except NotImplementedError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":634
 *         try:
 *             code = self.rule_code
 *         except NotImplementedError:             # <<<<<<<<<<<<<<
 *             return str(repr(self))
 * 
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NotImplementedError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.freqstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "pandas/_libs/tslibs/offsets.pyx":635
 *             code = self.rule_code
 *         except NotImplementedError:
 *             return str(repr(self))             # <<<<<<<<<<<<<<
 * 
 *         if self.n != 1:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = PyObject_Repr(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 635, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 635, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = ((PyObject*)__pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":632
 *         '-3N'
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             code = self.rule_code
 *         except NotImplementedError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":637
 *             return str(repr(self))
 * 
 *         if self.n != 1:             # <<<<<<<<<<<<<<
 *             fstr = f"{self.n}{code}"
 *         else:
 */
  __pyx_t_10 = ((__pyx_v_self->n != 1) != 0);
  if (__pyx_t_10) {

    /* "pandas/_libs/tslibs/offsets.pyx":638
 * 
 *         if self.n != 1:
 *             fstr = f"{self.n}{code}"             # <<<<<<<<<<<<<<
 *         else:
 *             fstr = code
 */
    __pyx_t_7 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_fstr = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":637
 *             return str(repr(self))
 * 
 *         if self.n != 1:             # <<<<<<<<<<<<<<
 *             fstr = f"{self.n}{code}"
 *         else:
 */
    goto __pyx_L11;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":640
 *             fstr = f"{self.n}{code}"
 *         else:
 *             fstr = code             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_code);
    __pyx_v_fstr = __pyx_v_code;
  }
  __pyx_L11:;

  /* "pandas/_libs/tslibs/offsets.pyx":642
 *             fstr = code
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self._offset:
 *                 fstr += self._offset_str()
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":643
 * 
 *         try:
 *             if self._offset:             # <<<<<<<<<<<<<<
 *                 fstr += self._offset_str()
 *         except AttributeError:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 643, __pyx_L12_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_10) {

        /* "pandas/_libs/tslibs/offsets.pyx":644
 *         try:
 *             if self._offset:
 *                 fstr += self._offset_str()             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             # TODO: standardize `_offset` vs `offset` naming convention
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_fstr, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_fstr, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":643
 * 
 *         try:
 *             if self._offset:             # <<<<<<<<<<<<<<
 *                 fstr += self._offset_str()
 *         except AttributeError:
 */
      }

      /* "pandas/_libs/tslibs/offsets.pyx":642
 *             fstr = code
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self._offset:
 *                 fstr += self._offset_str()
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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;

    /* "pandas/_libs/tslibs/offsets.pyx":645
 *             if self._offset:
 *                 fstr += self._offset_str()
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             # TODO: standardize `_offset` vs `offset` naming convention
 *             pass
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L13_exception_handled;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":642
 *             fstr = code
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self._offset:
 *                 fstr += self._offset_str()
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L13_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    __pyx_L17_try_end:;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":649
 *             pass
 * 
 *         return fstr             # <<<<<<<<<<<<<<
 * 
 *     def _offset_str(self) -> str:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyUnicode_CheckExact(__pyx_v_fstr))||((__pyx_v_fstr) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_fstr)->tp_name), 0))) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_fstr);
  __pyx_r = ((PyObject*)__pyx_v_fstr);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":614
 * 
 *     @cache_readonly
 *     def freqstr(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Return a string representing the frequency.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.freqstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_fstr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":651
 *         return fstr
 * 
 *     def _offset_str(self) -> str:             # <<<<<<<<<<<<<<
 *         return ""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_37_offset_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_37_offset_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_offset_str (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_36_offset_str(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_36_offset_str(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_offset_str", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":652
 * 
 *     def _offset_str(self) -> str:
 *         return ""             # <<<<<<<<<<<<<<
 * 
 *     # ------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_r = __pyx_kp_u__14;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":651
 *         return fstr
 * 
 *     def _offset_str(self) -> str:             # <<<<<<<<<<<<<<
 *         return ""
 * 
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":656
 *     # ------------------------------------------------------------------
 * 
 *     def apply_index(self, dtindex):             # <<<<<<<<<<<<<<
 *         """
 *         Vectorized apply of DateOffset to DatetimeIndex.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_39apply_index(PyObject *__pyx_v_self, PyObject *__pyx_v_dtindex); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_38apply_index[] = "\n        Vectorized apply of DateOffset to DatetimeIndex.\n\n        .. deprecated:: 1.1.0\n\n           Use ``offset + dtindex`` instead.\n\n        Parameters\n        ----------\n        index : DatetimeIndex\n\n        Returns\n        -------\n        DatetimeIndex\n\n        Raises\n        ------\n        NotImplementedError\n            When the specific offset subclass does not have a vectorized\n            implementation.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_39apply_index(PyObject *__pyx_v_self, PyObject *__pyx_v_dtindex) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_index (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_38apply_index(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtindex));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_38apply_index(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dtindex) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_index", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":678
 *             implementation.
 *         """
 *         warnings.warn("'Offset.apply_index(other)' is deprecated. "             # <<<<<<<<<<<<<<
 *                       "Use 'offset + other' instead.", FutureWarning)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":679
 *         """
 *         warnings.warn("'Offset.apply_index(other)' is deprecated. "
 *                       "Use 'offset + other' instead.", FutureWarning)             # <<<<<<<<<<<<<<
 * 
 *         res = self._apply_array(dtindex)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":681
 *                       "Use 'offset + other' instead.", FutureWarning)
 * 
 *         res = self._apply_array(dtindex)             # <<<<<<<<<<<<<<
 *         return type(dtindex)(res)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dtindex) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dtindex);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":682
 * 
 *         res = self._apply_array(dtindex)
 *         return type(dtindex)(res)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dtindex)));
  __pyx_t_2 = ((PyObject *)Py_TYPE(__pyx_v_dtindex)); __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_res) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_res);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":656
 *     # ------------------------------------------------------------------
 * 
 *     def apply_index(self, dtindex):             # <<<<<<<<<<<<<<
 *         """
 *         Vectorized apply of DateOffset to DatetimeIndex.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.apply_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":685
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(
 *             f"DateOffset subclass {type(self).__name__} "
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_41_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_41_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_40_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_40_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":687
 *     def _apply_array(self, dtarr):
 *         raise NotImplementedError(
 *             f"DateOffset subclass {type(self).__name__} "             # <<<<<<<<<<<<<<
 *             "does not have a vectorized implementation"
 *         )
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_DateOffset_subclass);
  __pyx_t_2 += 20;
  __Pyx_GIVEREF(__pyx_kp_u_DateOffset_subclass);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_DateOffset_subclass);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_does_not_have_a_vectorized_impl);
  __pyx_t_2 += 42;
  __Pyx_GIVEREF(__pyx_kp_u_does_not_have_a_vectorized_impl);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_does_not_have_a_vectorized_impl);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":686
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         raise NotImplementedError(             # <<<<<<<<<<<<<<
 *             f"DateOffset subclass {type(self).__name__} "
 *             "does not have a vectorized implementation"
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 686, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":685
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(
 *             f"DateOffset subclass {type(self).__name__} "
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":691
 *         )
 * 
 *     def rollback(self, dt) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date backward to next offset only if not on offset.
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_43rollback(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_42rollback[] = "\n        Roll provided date backward to next offset only if not on offset.\n\n        Returns\n        -------\n        TimeStamp\n            Rolled timestamp if not on offset, otherwise unchanged timestamp.\n        ";
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_43rollback(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollback (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_42rollback(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dt));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_42rollback(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);
  __Pyx_INCREF(__pyx_v_dt);

  /* "pandas/_libs/tslibs/offsets.pyx":700
 *             Rolled timestamp if not on offset, otherwise unchanged timestamp.
 *         """
 *         dt = Timestamp(dt)             # <<<<<<<<<<<<<<
 *         if not self.is_on_offset(dt):
 *             dt = dt - type(self)(1, normalize=self.normalize, **self.kwds)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dt) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dt);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":701
 *         """
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             dt = dt - type(self)(1, normalize=self.normalize, **self.kwds)
 *         return dt
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dt) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dt);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":702
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):
 *             dt = dt - type(self)(1, normalize=self.normalize, **self.kwds)             # <<<<<<<<<<<<<<
 *         return dt
 * 
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalize, __pyx_t_3) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 702, __pyx_L1_error)
    }
    if (__Pyx_MergeKeywords(__pyx_t_1, __pyx_t_2) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_tuple__23, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_dt, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":701
 *         """
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             dt = dt - type(self)(1, normalize=self.normalize, **self.kwds)
 *         return dt
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":703
 *         if not self.is_on_offset(dt):
 *             dt = dt - type(self)(1, normalize=self.normalize, **self.kwds)
 *         return dt             # <<<<<<<<<<<<<<
 * 
 *     def rollforward(self, dt) -> datetime:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_dt);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_v_dt);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":691
 *         )
 * 
 *     def rollback(self, dt) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date backward to next offset only if not on offset.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":705
 *         return dt
 * 
 *     def rollforward(self, dt) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date forward to next offset only if not on offset.
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_45rollforward(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_44rollforward[] = "\n        Roll provided date forward to next offset only if not on offset.\n\n        Returns\n        -------\n        TimeStamp\n            Rolled timestamp if not on offset, otherwise unchanged timestamp.\n        ";
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_45rollforward(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollforward (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_44rollforward(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dt));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_44rollforward(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollforward", 0);
  __Pyx_INCREF(__pyx_v_dt);

  /* "pandas/_libs/tslibs/offsets.pyx":714
 *             Rolled timestamp if not on offset, otherwise unchanged timestamp.
 *         """
 *         dt = Timestamp(dt)             # <<<<<<<<<<<<<<
 *         if not self.is_on_offset(dt):
 *             dt = dt + type(self)(1, normalize=self.normalize, **self.kwds)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dt) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dt);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":715
 *         """
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             dt = dt + type(self)(1, normalize=self.normalize, **self.kwds)
 *         return dt
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dt) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dt);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":716
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):
 *             dt = dt + type(self)(1, normalize=self.normalize, **self.kwds)             # <<<<<<<<<<<<<<
 *         return dt
 * 
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalize, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 716, __pyx_L1_error)
    }
    if (__Pyx_MergeKeywords(__pyx_t_1, __pyx_t_2) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_tuple__23, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_v_dt, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":715
 *         """
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             dt = dt + type(self)(1, normalize=self.normalize, **self.kwds)
 *         return dt
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":717
 *         if not self.is_on_offset(dt):
 *             dt = dt + type(self)(1, normalize=self.normalize, **self.kwds)
 *         return dt             # <<<<<<<<<<<<<<
 * 
 *     def _get_offset_day(self, other: datetime) -> int:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_dt);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_v_dt);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":705
 *         return dt
 * 
 *     def rollforward(self, dt) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date forward to next offset only if not on offset.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.rollforward", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":719
 *         return dt
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         # subclass must implement `_day_opt`; calling from the base class
 *         # will implicitly assume day_opt = "business_end", see get_day_of_month.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_47_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_47_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_offset_day (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_46_get_offset_day(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_46_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  npy_datetimestruct __pyx_v_dts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_offset_day", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":724
 *         cdef:
 *             npy_datetimestruct dts
 *         pydate_to_dtstruct(other, &dts)             # <<<<<<<<<<<<<<
 *         return get_day_of_month(&dts, self._day_opt)
 * 
 */
  if (!(likely(((((PyObject *)__pyx_v_other)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 724, __pyx_L1_error)
  __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_pydate_to_dtstruct(((PyDateTime_Date *)__pyx_v_other), (&__pyx_v_dts));

  /* "pandas/_libs/tslibs/offsets.pyx":725
 *             npy_datetimestruct dts
 *         pydate_to_dtstruct(other, &dts)
 *         return get_day_of_month(&dts, self._day_opt)             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 725, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month((&__pyx_v_dts), ((PyObject*)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":719
 *         return dt
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         # subclass must implement `_day_opt`; calling from the base class
 *         # will implicitly assume day_opt = "business_end", see get_day_of_month.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._get_offset_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":727
 *         return get_day_of_month(&dts, self._day_opt)
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp intersects with this frequency.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_49is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_48is_on_offset[] = "\n        Return boolean whether a timestamp intersects with this frequency.\n\n        Parameters\n        ----------\n        dt : datetime.datetime\n            Timestamp to check intersections with frequency.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Day(1)\n        >>> freq.is_on_offset(ts)\n        True\n\n        >>> ts = pd.Timestamp(2022, 8, 6)\n        >>> ts.day_name()\n        'Saturday'\n        >>> freq = pd.offsets.BusinessDay(1)\n        >>> freq.is_on_offset(ts)\n        False\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_49is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 727, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_48is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_48is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_v_a = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":750
 *         False
 *         """
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_2 = (__pyx_v_self->normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":751
 *         """
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Default (slow) method for determining if some date is a member of the
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":750
 *         False
 *         """
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":756
 *         # date range generated by this offset. Subclasses may have this
 *         # re-implemented in a nicer way.
 *         a = dt             # <<<<<<<<<<<<<<
 *         b = (dt + self) - self
 *         return a == b
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_dt));
  __pyx_v_a = __pyx_v_dt;

  /* "pandas/_libs/tslibs/offsets.pyx":757
 *         # re-implemented in a nicer way.
 *         a = dt
 *         b = (dt + self) - self             # <<<<<<<<<<<<<<
 *         return a == b
 * 
 */
  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_dt), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_b = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":758
 *         a = dt
 *         b = (dt + self) - self
 *         return a == b             # <<<<<<<<<<<<<<
 * 
 *     # ------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_a), __pyx_v_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":727
 *         return get_day_of_month(&dts, self._day_opt)
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp intersects with this frequency.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":765
 *     #  once BaseOffset is a cdef class and is inherited by Tick
 *     @staticmethod
 *     def _validate_n(n) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Require that `n` be an integer.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_51_validate_n(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_50_validate_n[] = "\n        Require that `n` be an integer.\n\n        Parameters\n        ----------\n        n : int\n\n        Returns\n        -------\n        nint : int\n\n        Raises\n        ------\n        TypeError if `int(n)` raises\n        ValueError if n != int(n)\n        ";
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_51_validate_n = {"_validate_n", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_51_validate_n, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_50_validate_n};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_51_validate_n(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_validate_n (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_validate_n") < 0)) __PYX_ERR(0, 765, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_validate_n", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 765, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._validate_n", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_50_validate_n(__pyx_v_n);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_50_validate_n(PyObject *__pyx_v_n) {
  PyObject *__pyx_v_nint = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_validate_n", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":782
 *         ValueError if n != int(n)
 *         """
 *         if util.is_timedelta64_object(n):             # <<<<<<<<<<<<<<
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         try:
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_timedelta64_object(__pyx_v_n) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":783
 *         """
 *         if util.is_timedelta64_object(n):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')             # <<<<<<<<<<<<<<
 *         try:
 *             nint = int(n)
 */
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_n)), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_n_argument_must_be_an_integer_g, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 783, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":782
 *         ValueError if n != int(n)
 *         """
 *         if util.is_timedelta64_object(n):             # <<<<<<<<<<<<<<
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         try:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":784
 *         if util.is_timedelta64_object(n):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         try:             # <<<<<<<<<<<<<<
 *             nint = int(n)
 *         except (ValueError, TypeError):
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":785
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         try:
 *             nint = int(n)             # <<<<<<<<<<<<<<
 *         except (ValueError, TypeError):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 */
      __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_nint = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":784
 *         if util.is_timedelta64_object(n):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         try:             # <<<<<<<<<<<<<<
 *             nint = int(n)
 *         except (ValueError, TypeError):
 */
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":786
 *         try:
 *             nint = int(n)
 *         except (ValueError, TypeError):             # <<<<<<<<<<<<<<
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         if n != nint:
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._validate_n", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(0, 786, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pandas/_libs/tslibs/offsets.pyx":787
 *             nint = int(n)
 *         except (ValueError, TypeError):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')             # <<<<<<<<<<<<<<
 *         if n != nint:
 *             raise ValueError(f'`n` argument must be an integer, got {n}')
 */
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_n)), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 787, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_kp_u_n_argument_must_be_an_integer_g, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 787, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 787, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(0, 787, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":784
 *         if util.is_timedelta64_object(n):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         try:             # <<<<<<<<<<<<<<
 *             nint = int(n)
 *         except (ValueError, TypeError):
 */
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":788
 *         except (ValueError, TypeError):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         if n != nint:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'`n` argument must be an integer, got {n}')
 *         return nint
 */
  __pyx_t_8 = PyObject_RichCompare(__pyx_v_n, __pyx_v_nint, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":789
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         if n != nint:
 *             raise ValueError(f'`n` argument must be an integer, got {n}')             # <<<<<<<<<<<<<<
 *         return nint
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_n, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_n_argument_must_be_an_integer_g, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __PYX_ERR(0, 789, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":788
 *         except (ValueError, TypeError):
 *             raise TypeError(f'`n` argument must be an integer, got {type(n)}')
 *         if n != nint:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'`n` argument must be an integer, got {n}')
 *         return nint
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":790
 *         if n != nint:
 *             raise ValueError(f'`n` argument must be an integer, got {n}')
 *         return nint             # <<<<<<<<<<<<<<
 * 
 *     def __setstate__(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_nint);
  __pyx_r = __pyx_v_nint;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":765
 *     #  once BaseOffset is a cdef class and is inherited by Tick
 *     @staticmethod
 *     def _validate_n(n) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Require that `n` be an integer.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset._validate_n", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nint);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":792
 *         return nint
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         """
 *         Reconstruct an instance from a pickled state
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_53__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_52__setstate__[] = "\n        Reconstruct an instance from a pickled state\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_53__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_52__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_52__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":796
 *         Reconstruct an instance from a pickled state
 *         """
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self._cache = state.pop("_cache", {})
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_4 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->n = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":797
 *         """
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self._cache = state.pop("_cache", {})
 *         # At this point we expect state to be empty
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->normalize = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":798
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self._cache = state.pop("_cache", {})             # <<<<<<<<<<<<<<
 *         # At this point we expect state to be empty
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_cache, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_cache, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_n_u_cache);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_cache);
  __Pyx_DECREF(__pyx_v_self->_cache);
  __pyx_v_self->_cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":792
 *         return nint
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         """
 *         Reconstruct an instance from a pickled 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_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":801
 *         # At this point we expect state to be empty
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a pickleable state
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_55__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_54__getstate__[] = "\n        Return a pickleable state\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_55__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_54__getstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_54__getstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":805
 *         Return a pickleable state
 *         """
 *         state = {}             # <<<<<<<<<<<<<<
 *         state["n"] = self.n
 *         state["normalize"] = self.normalize
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":806
 *         """
 *         state = {}
 *         state["n"] = self.n             # <<<<<<<<<<<<<<
 *         state["normalize"] = self.normalize
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_n, __pyx_t_1) < 0)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":807
 *         state = {}
 *         state["n"] = self.n
 *         state["normalize"] = self.normalize             # <<<<<<<<<<<<<<
 * 
 *         # we don't want to actually pickle the calendar object
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_normalize, __pyx_t_1) < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":811
 *         # we don't want to actually pickle the calendar object
 *         # as its a np.busyday; we recreate on deserialization
 *         state.pop("calendar", None)             # <<<<<<<<<<<<<<
 *         if "kwds" in state:
 *             state["kwds"].pop("calendar", None)
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_state, __pyx_n_u_calendar, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":812
 *         # as its a np.busyday; we recreate on deserialization
 *         state.pop("calendar", None)
 *         if "kwds" in state:             # <<<<<<<<<<<<<<
 *             state["kwds"].pop("calendar", None)
 * 
 */
  __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_kwds, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 812, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":813
 *         state.pop("calendar", None)
 *         if "kwds" in state:
 *             state["kwds"].pop("calendar", None)             # <<<<<<<<<<<<<<
 * 
 *         return state
 */
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_state, __pyx_n_u_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":812
 *         # as its a np.busyday; we recreate on deserialization
 *         state.pop("calendar", None)
 *         if "kwds" in state:             # <<<<<<<<<<<<<<
 *             state["kwds"].pop("calendar", None)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":815
 *             state["kwds"].pop("calendar", None)
 * 
 *         return state             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_state);
  __pyx_r = __pyx_v_state;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":801
 *         # At this point we expect state to be empty
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a pickleable state
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":818
 * 
 *     @property
 *     def nanos(self):             # <<<<<<<<<<<<<<
 *         raise ValueError(f"{self} is a non-fixed frequency")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5nanos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5nanos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5nanos___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":819
 *     @property
 *     def nanos(self):
 *         raise ValueError(f"{self} is a non-fixed frequency")             # <<<<<<<<<<<<<<
 * 
 *     def onOffset(self, dt) -> bool:
 */
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_is_a_non_fixed_frequency); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 819, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":818
 * 
 *     @property
 *     def nanos(self):             # <<<<<<<<<<<<<<
 *         raise ValueError(f"{self} is a non-fixed frequency")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.nanos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":821
 *         raise ValueError(f"{self} is a non-fixed frequency")
 * 
 *     def onOffset(self, dt) -> bool:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "onOffset is a deprecated, use is_on_offset instead.",
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_57onOffset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_57onOffset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("onOffset (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_56onOffset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_56onOffset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("onOffset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":822
 * 
 *     def onOffset(self, dt) -> bool:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "onOffset is a deprecated, use is_on_offset instead.",
 *             FutureWarning,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":825
 *             "onOffset is a deprecated, use is_on_offset instead.",
 *             FutureWarning,
 *             stacklevel=find_stack_level(),             # <<<<<<<<<<<<<<
 *         )
 *         return self.is_on_offset(dt)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_find_stack_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stacklevel, __pyx_t_3) < 0) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":822
 * 
 *     def onOffset(self, dt) -> bool:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "onOffset is a deprecated, use is_on_offset instead.",
 *             FutureWarning,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__25, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":827
 *             stacklevel=find_stack_level(),
 *         )
 *         return self.is_on_offset(dt)             # <<<<<<<<<<<<<<
 * 
 *     def isAnchored(self) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_dt) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_dt);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":821
 *         raise ValueError(f"{self} is a non-fixed frequency")
 * 
 *     def onOffset(self, dt) -> bool:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "onOffset is a deprecated, use is_on_offset instead.",
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.onOffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":829
 *         return self.is_on_offset(dt)
 * 
 *     def isAnchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "isAnchored is a deprecated, use is_anchored instead.",
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_59isAnchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_59isAnchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isAnchored (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_58isAnchored(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":830
 * 
 *     def isAnchored(self) -> bool:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "isAnchored is a deprecated, use is_anchored instead.",
 *             FutureWarning,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":833
 *             "isAnchored is a deprecated, use is_anchored instead.",
 *             FutureWarning,
 *             stacklevel=find_stack_level(),             # <<<<<<<<<<<<<<
 *         )
 *         return self.is_anchored()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_find_stack_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stacklevel, __pyx_t_3) < 0) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":830
 * 
 *     def isAnchored(self) -> bool:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "isAnchored is a deprecated, use is_anchored instead.",
 *             FutureWarning,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":835
 *             stacklevel=find_stack_level(),
 *         )
 *         return self.is_anchored()             # <<<<<<<<<<<<<<
 * 
 *     def is_anchored(self) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_anchored); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":829
 *         return self.is_on_offset(dt)
 * 
 *     def isAnchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "isAnchored is a deprecated, use is_anchored instead.",
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.isAnchored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":837
 *         return self.is_anchored()
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         # TODO: Does this make sense for the general case?  It would help
 *         # if there were a canonical docstring for what is_anchored means.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_61is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_60is_anchored[] = "\n        Return boolean whether the frequency is a unit frequency (n=1).\n\n        Examples\n        --------\n        >>> pd.DateOffset().is_anchored()\n        True\n        >>> pd.DateOffset(2).is_anchored()\n        False\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_61is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_anchored (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_60is_anchored(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":850
 *         False
 *         """
 *         return self.n == 1             # <<<<<<<<<<<<<<
 * 
 *     # ------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->n == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":837
 *         return self.is_anchored()
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         # TODO: Does this make sense for the general case?  It would help
 *         # if there were a canonical docstring for what is_anchored means.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_anchored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":854
 *     # ------------------------------------------------------------------
 * 
 *     def is_month_start(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the month start.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_63is_month_start(PyObject *__pyx_v_self, PyObject *__pyx_v_ts); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_62is_month_start[] = "\n        Return boolean whether a timestamp occurs on the month start.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_month_start(ts)\n        True\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_63is_month_start(PyObject *__pyx_v_self, PyObject *__pyx_v_ts) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_month_start (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ts), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp, 1, "ts", 0))) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_62is_month_start(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_62is_month_start(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_month_start", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":865
 *         True
 *         """
 *         return ts._get_start_end_field("is_month_start", self)             # <<<<<<<<<<<<<<
 * 
 *     def is_month_end(self, _Timestamp ts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts->__pyx_vtab)->_get_start_end_field(__pyx_v_ts, __pyx_n_u_is_month_start, ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":854
 *     # ------------------------------------------------------------------
 * 
 *     def is_month_start(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the month start.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_month_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":867
 *         return ts._get_start_end_field("is_month_start", self)
 * 
 *     def is_month_end(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the month end.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_65is_month_end(PyObject *__pyx_v_self, PyObject *__pyx_v_ts); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_64is_month_end[] = "\n        Return boolean whether a timestamp occurs on the month end.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_month_end(ts)\n        False\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_65is_month_end(PyObject *__pyx_v_self, PyObject *__pyx_v_ts) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_month_end (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ts), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp, 1, "ts", 0))) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_64is_month_end(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_64is_month_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_month_end", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":878
 *         False
 *         """
 *         return ts._get_start_end_field("is_month_end", self)             # <<<<<<<<<<<<<<
 * 
 *     def is_quarter_start(self, _Timestamp ts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts->__pyx_vtab)->_get_start_end_field(__pyx_v_ts, __pyx_n_u_is_month_end, ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":867
 *         return ts._get_start_end_field("is_month_start", self)
 * 
 *     def is_month_end(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the month end.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_month_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":880
 *         return ts._get_start_end_field("is_month_end", self)
 * 
 *     def is_quarter_start(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the quarter start.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_67is_quarter_start(PyObject *__pyx_v_self, PyObject *__pyx_v_ts); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_66is_quarter_start[] = "\n        Return boolean whether a timestamp occurs on the quarter start.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_quarter_start(ts)\n        True\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_67is_quarter_start(PyObject *__pyx_v_self, PyObject *__pyx_v_ts) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_quarter_start (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ts), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp, 1, "ts", 0))) __PYX_ERR(0, 880, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_66is_quarter_start(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_66is_quarter_start(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_quarter_start", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":891
 *         True
 *         """
 *         return ts._get_start_end_field("is_quarter_start", self)             # <<<<<<<<<<<<<<
 * 
 *     def is_quarter_end(self, _Timestamp ts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts->__pyx_vtab)->_get_start_end_field(__pyx_v_ts, __pyx_n_u_is_quarter_start, ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":880
 *         return ts._get_start_end_field("is_month_end", self)
 * 
 *     def is_quarter_start(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the quarter start.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_quarter_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":893
 *         return ts._get_start_end_field("is_quarter_start", self)
 * 
 *     def is_quarter_end(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the quarter end.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_69is_quarter_end(PyObject *__pyx_v_self, PyObject *__pyx_v_ts); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_68is_quarter_end[] = "\n        Return boolean whether a timestamp occurs on the quarter end.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_quarter_end(ts)\n        False\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_69is_quarter_end(PyObject *__pyx_v_self, PyObject *__pyx_v_ts) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_quarter_end (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ts), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp, 1, "ts", 0))) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_68is_quarter_end(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_68is_quarter_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_quarter_end", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":904
 *         False
 *         """
 *         return ts._get_start_end_field("is_quarter_end", self)             # <<<<<<<<<<<<<<
 * 
 *     def is_year_start(self, _Timestamp ts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts->__pyx_vtab)->_get_start_end_field(__pyx_v_ts, __pyx_n_u_is_quarter_end, ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":893
 *         return ts._get_start_end_field("is_quarter_start", self)
 * 
 *     def is_quarter_end(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the quarter end.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_quarter_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":906
 *         return ts._get_start_end_field("is_quarter_end", self)
 * 
 *     def is_year_start(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the year start.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_71is_year_start(PyObject *__pyx_v_self, PyObject *__pyx_v_ts); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_70is_year_start[] = "\n        Return boolean whether a timestamp occurs on the year start.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_year_start(ts)\n        True\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_71is_year_start(PyObject *__pyx_v_self, PyObject *__pyx_v_ts) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_year_start (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ts), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp, 1, "ts", 0))) __PYX_ERR(0, 906, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_70is_year_start(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_70is_year_start(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_year_start", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":917
 *         True
 *         """
 *         return ts._get_start_end_field("is_year_start", self)             # <<<<<<<<<<<<<<
 * 
 *     def is_year_end(self, _Timestamp ts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts->__pyx_vtab)->_get_start_end_field(__pyx_v_ts, __pyx_n_u_is_year_start, ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":906
 *         return ts._get_start_end_field("is_quarter_end", self)
 * 
 *     def is_year_start(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the year start.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_year_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":919
 *         return ts._get_start_end_field("is_year_start", self)
 * 
 *     def is_year_end(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the year end.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_73is_year_end(PyObject *__pyx_v_self, PyObject *__pyx_v_ts); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_72is_year_end[] = "\n        Return boolean whether a timestamp occurs on the year end.\n\n        Examples\n        --------\n        >>> ts = pd.Timestamp(2022, 1, 1)\n        >>> freq = pd.offsets.Hour(5)\n        >>> freq.is_year_end(ts)\n        False\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_73is_year_end(PyObject *__pyx_v_self, PyObject *__pyx_v_ts) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_year_end (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ts), __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp, 1, "ts", 0))) __PYX_ERR(0, 919, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_72is_year_end(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_72is_year_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp *__pyx_v_ts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_year_end", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":930
 *         False
 *         """
 *         return ts._get_start_end_field("is_year_end", self)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp *)__pyx_v_ts->__pyx_vtab)->_get_start_end_field(__pyx_v_ts, __pyx_n_u_is_year_end, ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":919
 *         return ts._get_start_end_field("is_year_start", self)
 * 
 *     def is_year_end(self, _Timestamp ts):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean whether a timestamp occurs on the year end.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.is_year_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pxd":10
 * cdef class BaseOffset:
 *     cdef readonly:
 *         int64_t n             # <<<<<<<<<<<<<<
 *         bint normalize
 *         dict _cache
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1n_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1n_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1n___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1n___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.n.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pxd":11
 *     cdef readonly:
 *         int64_t n
 *         bint normalize             # <<<<<<<<<<<<<<
 *         dict _cache
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9normalize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9normalize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9normalize___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9normalize___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.normalize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pxd":12
 *         int64_t n
 *         bint normalize
 *         dict _cache             # <<<<<<<<<<<<<<
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6_cache_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6_cache_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6_cache___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6_cache___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_cache);
  __pyx_r = __pyx_v_self->_cache;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __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_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_74__reduce_cython__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_74__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__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;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  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._cache, self.n, self.normalize)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->n); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->normalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->_cache);
  __Pyx_GIVEREF(__pyx_v_self->_cache);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_cache);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._cache, self.n, self.normalize)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._cache, self.n, self.normalize)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._cache is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._cache, self.n, self.normalize)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._cache is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->_cache != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._cache is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._cache is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_BaseOffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_10844460);
    __Pyx_GIVEREF(__pyx_int_10844460);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_10844460);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._cache is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, None), state
 *     else:
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BaseOffset__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_BaseOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_10844460);
    __Pyx_GIVEREF(__pyx_int_10844460);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_10844460);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 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_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__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_BaseOffset, (type(self), 0x0a5792c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseOffset__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_76__setstate_cython__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_76__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BaseOffset__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_BaseOffset__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BaseOffset, (type(self), 0x0a5792c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseOffset__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BaseOffset.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":935
 * cdef class SingleConstructorOffset(BaseOffset):
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         # default _from_name calls cls with no args
 *         if suffix:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_1_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_1_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 935, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 935, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SingleConstructorOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset__from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset__from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":937
 *     def _from_name(cls, suffix=None):
 *         # default _from_name calls cls with no args
 *         if suffix:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Bad freq suffix {suffix}")
 *         return cls()
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_suffix); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 937, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":938
 *         # default _from_name calls cls with no args
 *         if suffix:
 *             raise ValueError(f"Bad freq suffix {suffix}")             # <<<<<<<<<<<<<<
 *         return cls()
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_suffix, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Bad_freq_suffix, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 938, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":937
 *     def _from_name(cls, suffix=None):
 *         # default _from_name calls cls with no args
 *         if suffix:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Bad freq suffix {suffix}")
 *         return cls()
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":939
 *         if suffix:
 *             raise ValueError(f"Bad freq suffix {suffix}")
 *         return cls()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":935
 * cdef class SingleConstructorOffset(BaseOffset):
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         # default _from_name calls cls with no args
 *         if suffix:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SingleConstructorOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":941
 *         return cls()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # This __reduce__ implementation is for all BaseOffset subclasses
 *         #  except for RelativeDeltaOffset
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_2__reduce__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pandas/_libs/tslibs/offsets.pyx":947
 *         #  from attributes that do get pickled.
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None             # <<<<<<<<<<<<<<
 *             for attr in self._attributes
 *         )
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 947, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_reduce___locals_genexpr, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!gen)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SingleConstructorOffset.__reduce__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 947, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":948
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None
 *             for attr in self._attributes             # <<<<<<<<<<<<<<
 *         )
 *         return type(self), tup
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 948, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 948, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 948, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 948, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_attr);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_attr, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":947
 *         #  from attributes that do get pickled.
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None             # <<<<<<<<<<<<<<
 *             for attr in self._attributes
 *         )
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_attr, __pyx_n_u_calendar, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 947, __pyx_L1_error)
    if (__pyx_t_5) {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 947, __pyx_L1_error) }
      __pyx_t_6 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_cur_scope->__pyx_v_attr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_1 = __pyx_t_7;
      __pyx_t_7 = 0;
    } else {
      __Pyx_INCREF(Py_None);
      __pyx_t_1 = Py_None;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 947, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":948
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None
 *             for attr in self._attributes             # <<<<<<<<<<<<<<
 *         )
 *         return type(self), tup
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pandas/_libs/tslibs/offsets.pyx":947
 *         #  from attributes that do get pickled.
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None             # <<<<<<<<<<<<<<
 *             for attr in self._attributes
 *         )
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":941
 *         return cls()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # This __reduce__ implementation is for all BaseOffset subclasses
 *         #  except for RelativeDeltaOffset
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_2__reduce__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset *__pyx_v_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *__pyx_cur_scope;
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___2generator3 = 0;
  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("__reduce__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 941, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

  /* "pandas/_libs/tslibs/offsets.pyx":947
 *         #  from attributes that do get pickled.
 *         tup = tuple(
 *             getattr(self, attr) if attr != "calendar" else None             # <<<<<<<<<<<<<<
 *             for attr in self._attributes
 *         )
 */
  __pyx_t_1 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":946
 *         # np.busdaycalendar objects do not pickle nicely, but we can reconstruct
 *         #  from attributes that do get pickled.
 *         tup = tuple(             # <<<<<<<<<<<<<<
 *             getattr(self, attr) if attr != "calendar" else None
 *             for attr in self._attributes
 */
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tup = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":950
 *             for attr in self._attributes
 *         )
 *         return type(self), tup             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_cur_scope->__pyx_v_self))));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_cur_scope->__pyx_v_self))));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_cur_scope->__pyx_v_self))));
  __Pyx_INCREF(__pyx_v_tup);
  __Pyx_GIVEREF(__pyx_v_tup);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_tup);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":941
 *         return cls()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # This __reduce__ implementation is for all BaseOffset subclasses
 *         #  except for RelativeDeltaOffset
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SingleConstructorOffset.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_gb_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_10__reduce___2generator3);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":962
 *     _attributes = tuple(["n", "normalize"])
 * 
 *     def __init__(self, n=1, normalize=False):             # <<<<<<<<<<<<<<
 *         n = self._validate_n(n)
 *         self.n = n
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 962, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 962, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_n);

  /* "pandas/_libs/tslibs/offsets.pyx":963
 * 
 *     def __init__(self, n=1, normalize=False):
 *         n = self._validate_n(n)             # <<<<<<<<<<<<<<
 *         self.n = n
 *         self.normalize = False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":964
 *     def __init__(self, n=1, normalize=False):
 *         n = self._validate_n(n)
 *         self.n = n             # <<<<<<<<<<<<<<
 *         self.normalize = False
 *         self._cache = {}
 */
  __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_v_n); if (unlikely((__pyx_t_4 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 964, __pyx_L1_error)
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":965
 *         n = self._validate_n(n)
 *         self.n = n
 *         self.normalize = False             # <<<<<<<<<<<<<<
 *         self._cache = {}
 *         if normalize:
 */
  __pyx_v_self->__pyx_base.__pyx_base.normalize = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":966
 *         self.n = n
 *         self.normalize = False
 *         self._cache = {}             # <<<<<<<<<<<<<<
 *         if normalize:
 *             # GH#21427
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._cache);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._cache);
  __pyx_v_self->__pyx_base.__pyx_base._cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":967
 *         self.normalize = False
 *         self._cache = {}
 *         if normalize:             # <<<<<<<<<<<<<<
 *             # GH#21427
 *             raise ValueError(
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_normalize); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 967, __pyx_L1_error)
  if (unlikely(__pyx_t_5)) {

    /* "pandas/_libs/tslibs/offsets.pyx":969
 *         if normalize:
 *             # GH#21427
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Tick offset with `normalize=True` are not allowed."
 *             )
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 969, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":967
 *         self.normalize = False
 *         self._cache = {}
 *         if normalize:             # <<<<<<<<<<<<<<
 *             # GH#21427
 *             raise ValueError(
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":962
 *     _attributes = tuple(["n", "normalize"])
 * 
 *     def __init__(self, n=1, normalize=False):             # <<<<<<<<<<<<<<
 *         n = self._validate_n(n)
 *         self.n = n
 */

  /* 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_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":975
 *     # Note: Without making this cpdef, we get AttributeError when calling
 *     #  from __mul__
 *     cpdef Tick _next_higher_resolution(Tick self):             # <<<<<<<<<<<<<<
 *         if type(self) is Day:
 *             return Hour(self.n * 24)
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_3_next_higher_resolution(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Tick__next_higher_resolution(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_next_higher_resolution", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_higher_resolution); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_3_next_higher_resolution)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick))))) __PYX_ERR(0, 975, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":976
 *     #  from __mul__
 *     cpdef Tick _next_higher_resolution(Tick self):
 *         if type(self) is Day:             # <<<<<<<<<<<<<<
 *             return Hour(self.n * 24)
 *         if type(self) is Hour:
 */
  __pyx_t_5 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":977
 *     cpdef Tick _next_higher_resolution(Tick self):
 *         if type(self) is Day:
 *             return Hour(self.n * 24)             # <<<<<<<<<<<<<<
 *         if type(self) is Hour:
 *             return Minute(self.n * 60)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_self->__pyx_base.__pyx_base.n * 24)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":976
 *     #  from __mul__
 *     cpdef Tick _next_higher_resolution(Tick self):
 *         if type(self) is Day:             # <<<<<<<<<<<<<<
 *             return Hour(self.n * 24)
 *         if type(self) is Hour:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":978
 *         if type(self) is Day:
 *             return Hour(self.n * 24)
 *         if type(self) is Hour:             # <<<<<<<<<<<<<<
 *             return Minute(self.n * 60)
 *         if type(self) is Minute:
 */
  __pyx_t_6 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour));
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":979
 *             return Hour(self.n * 24)
 *         if type(self) is Hour:
 *             return Minute(self.n * 60)             # <<<<<<<<<<<<<<
 *         if type(self) is Minute:
 *             return Second(self.n * 60)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64((__pyx_v_self->__pyx_base.__pyx_base.n * 60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":978
 *         if type(self) is Day:
 *             return Hour(self.n * 24)
 *         if type(self) is Hour:             # <<<<<<<<<<<<<<
 *             return Minute(self.n * 60)
 *         if type(self) is Minute:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":980
 *         if type(self) is Hour:
 *             return Minute(self.n * 60)
 *         if type(self) is Minute:             # <<<<<<<<<<<<<<
 *             return Second(self.n * 60)
 *         if type(self) is Second:
 */
  __pyx_t_5 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":981
 *             return Minute(self.n * 60)
 *         if type(self) is Minute:
 *             return Second(self.n * 60)             # <<<<<<<<<<<<<<
 *         if type(self) is Second:
 *             return Milli(self.n * 1000)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_self->__pyx_base.__pyx_base.n * 60)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":980
 *         if type(self) is Hour:
 *             return Minute(self.n * 60)
 *         if type(self) is Minute:             # <<<<<<<<<<<<<<
 *             return Second(self.n * 60)
 *         if type(self) is Second:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":982
 *         if type(self) is Minute:
 *             return Second(self.n * 60)
 *         if type(self) is Second:             # <<<<<<<<<<<<<<
 *             return Milli(self.n * 1000)
 *         if type(self) is Milli:
 */
  __pyx_t_6 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second));
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":983
 *             return Second(self.n * 60)
 *         if type(self) is Second:
 *             return Milli(self.n * 1000)             # <<<<<<<<<<<<<<
 *         if type(self) is Milli:
 *             return Micro(self.n * 1000)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64((__pyx_v_self->__pyx_base.__pyx_base.n * 0x3E8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":982
 *         if type(self) is Minute:
 *             return Second(self.n * 60)
 *         if type(self) is Second:             # <<<<<<<<<<<<<<
 *             return Milli(self.n * 1000)
 *         if type(self) is Milli:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":984
 *         if type(self) is Second:
 *             return Milli(self.n * 1000)
 *         if type(self) is Milli:             # <<<<<<<<<<<<<<
 *             return Micro(self.n * 1000)
 *         if type(self) is Micro:
 */
  __pyx_t_5 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":985
 *             return Milli(self.n * 1000)
 *         if type(self) is Milli:
 *             return Micro(self.n * 1000)             # <<<<<<<<<<<<<<
 *         if type(self) is Micro:
 *             return Nano(self.n * 1000)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_self->__pyx_base.__pyx_base.n * 0x3E8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":984
 *         if type(self) is Second:
 *             return Milli(self.n * 1000)
 *         if type(self) is Milli:             # <<<<<<<<<<<<<<
 *             return Micro(self.n * 1000)
 *         if type(self) is Micro:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":986
 *         if type(self) is Milli:
 *             return Micro(self.n * 1000)
 *         if type(self) is Micro:             # <<<<<<<<<<<<<<
 *             return Nano(self.n * 1000)
 *         raise ValueError("Could not convert to integer offset at any resolution")
 */
  __pyx_t_6 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro));
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":987
 *             return Micro(self.n * 1000)
 *         if type(self) is Micro:
 *             return Nano(self.n * 1000)             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not convert to integer offset at any resolution")
 * 
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64((__pyx_v_self->__pyx_base.__pyx_base.n * 0x3E8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":986
 *         if type(self) is Milli:
 *             return Micro(self.n * 1000)
 *         if type(self) is Micro:             # <<<<<<<<<<<<<<
 *             return Nano(self.n * 1000)
 *         raise ValueError("Could not convert to integer offset at any resolution")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":988
 *         if type(self) is Micro:
 *             return Nano(self.n * 1000)
 *         raise ValueError("Could not convert to integer offset at any resolution")             # <<<<<<<<<<<<<<
 * 
 *     # --------------------------------------------------------------------
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 988, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":975
 *     # Note: Without making this cpdef, we get AttributeError when calling
 *     #  from __mul__
 *     cpdef Tick _next_higher_resolution(Tick self):             # <<<<<<<<<<<<<<
 *         if type(self) is Day:
 *             return Hour(self.n * 24)
 */

  /* 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("pandas._libs.tslibs.offsets.Tick._next_higher_resolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_3_next_higher_resolution(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_3_next_higher_resolution(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_next_higher_resolution (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_2_next_higher_resolution(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_2_next_higher_resolution(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_next_higher_resolution", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Tick__next_higher_resolution(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick._next_higher_resolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":992
 *     # --------------------------------------------------------------------
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         # Since cdef classes have no __dict__, we need to override
 *         return ""
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_attrs (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_4_repr_attrs(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_4_repr_attrs(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_attrs", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":994
 *     def _repr_attrs(self) -> str:
 *         # Since cdef classes have no __dict__, we need to override
 *         return ""             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_r = __pyx_kp_u__14;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":992
 *     # --------------------------------------------------------------------
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         # Since cdef classes have no __dict__, we need to override
 *         return ""
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":997
 * 
 *     @property
 *     def delta(self):             # <<<<<<<<<<<<<<
 *         return self.n * Timedelta(self._nanos_inc)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5delta_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5delta_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_5delta___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":998
 *     @property
 *     def delta(self):
 *         return self.n * Timedelta(self._nanos_inc)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nanos_inc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":997
 * 
 *     @property
 *     def delta(self):             # <<<<<<<<<<<<<<
 *         return self.n * Timedelta(self._nanos_inc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.delta.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1001
 * 
 *     @property
 *     def nanos(self) -> int64_t:             # <<<<<<<<<<<<<<
 *         """
 *         Return an integer of the total number of nanoseconds.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5nanos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5nanos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_5nanos___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1015
 *         18000000000000
 *         """
 *         return self.n * self._nanos_inc             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nanos_inc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1001
 * 
 *     @property
 *     def nanos(self) -> int64_t:             # <<<<<<<<<<<<<<
 *         """
 *         Return an integer of the total number of nanoseconds.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.nanos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1017
 *         return self.n * self._nanos_inc
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_7is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_7is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 1017, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_6is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_6is_on_offset(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, CYTHON_UNUSED PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1018
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def is_anchored(self) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1017
 *         return self.n * self._nanos_inc
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":1020
 *         return True
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_9is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_9is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_anchored (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_8is_anchored(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_8is_anchored(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_anchored", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1021
 * 
 *     def is_anchored(self) -> bool:
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     # This is identical to BaseOffset.__hash__, but has to be redefined here
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1020
 *         return True
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":1025
 *     # This is identical to BaseOffset.__hash__, but has to be redefined here
 *     # for Python 3, because we've redefined __eq__.
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return hash(self._params)
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_11__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_11__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_10__hash__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1026
 *     # for Python 3, because we've redefined __eq__.
 *     def __hash__(self) -> int:
 *         return hash(self._params)             # <<<<<<<<<<<<<<
 * 
 *     # --------------------------------------------------------------------
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1025
 *     # This is identical to BaseOffset.__hash__, but has to be redefined here
 *     # for Python 3, because we've redefined __eq__.
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return hash(self._params)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1031
 *     # Comparison and Arithmetic Methods
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, str):
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_12__eq__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_12__eq__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":1032
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, str):             # <<<<<<<<<<<<<<
 *             try:
 *                 # GH#23524 if to_offset fails, we are dealing with an
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_other); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1033
 *     def __eq__(self, other):
 *         if isinstance(other, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":1036
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 *                 other = to_offset(other)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 # e.g. "infer"
 */
        __pyx_t_6 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_to_offset(__pyx_v_other, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1033
 *     def __eq__(self, other):
 *         if isinstance(other, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1037
 *                 #  incomparable type so == is False and != is True
 *                 other = to_offset(other)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 # e.g. "infer"
 *                 return False
 */
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1037, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_9);

        /* "pandas/_libs/tslibs/offsets.pyx":1039
 *             except ValueError:
 *                 # e.g. "infer"
 *                 return False             # <<<<<<<<<<<<<<
 *         return self.delta == other
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "pandas/_libs/tslibs/offsets.pyx":1033
 *     def __eq__(self, other):
 *         if isinstance(other, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 # GH#23524 if to_offset fails, we are dealing with an
 *                 #  incomparable type so == is False and != is True
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1032
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, str):             # <<<<<<<<<<<<<<
 *             try:
 *                 # GH#23524 if to_offset fails, we are dealing with an
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1040
 *                 # e.g. "infer"
 *                 return False
 *         return self.delta == other             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1031
 *     # Comparison and Arithmetic Methods
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, str):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1042
 *         return self.delta == other
 * 
 *     def __ne__(self, other):             # <<<<<<<<<<<<<<
 *         return not (self == other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_15__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_15__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_14__ne__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1043
 * 
 *     def __ne__(self, other):
 *         return not (self == other)             # <<<<<<<<<<<<<<
 * 
 *     def __le__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self), __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1042
 *         return self.delta == other
 * 
 *     def __ne__(self, other):             # <<<<<<<<<<<<<<
 *         return not (self == other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1045
 *         return not (self == other)
 * 
 *     def __le__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__le__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_17__le__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_17__le__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__le__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_16__le__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1046
 * 
 *     def __le__(self, other):
 *         return self.delta.__le__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __lt__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_le); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1045
 *         return not (self == other)
 * 
 *     def __le__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__le__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__le__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1048
 *         return self.delta.__le__(other)
 * 
 *     def __lt__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__lt__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_19__lt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_19__lt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__lt__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_18__lt__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1049
 * 
 *     def __lt__(self, other):
 *         return self.delta.__lt__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __ge__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1048
 *         return self.delta.__le__(other)
 * 
 *     def __lt__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__lt__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1051
 *         return self.delta.__lt__(other)
 * 
 *     def __ge__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__ge__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_21__ge__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_21__ge__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ge__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_20__ge__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1052
 * 
 *     def __ge__(self, other):
 *         return self.delta.__ge__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __gt__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ge); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1051
 *         return self.delta.__lt__(other)
 * 
 *     def __ge__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__ge__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__ge__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1054
 *         return self.delta.__ge__(other)
 * 
 *     def __gt__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__gt__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_23__gt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_23__gt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__gt__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_22__gt__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1055
 * 
 *     def __gt__(self, other):
 *         return self.delta.__gt__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1054
 *         return self.delta.__ge__(other)
 * 
 *     def __gt__(self, other):             # <<<<<<<<<<<<<<
 *         return self.delta.__gt__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__gt__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1057
 *         return self.delta.__gt__(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, Tick):
 *             # TODO(cython3), remove this, this moved to __rmul__
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_25__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_25__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_24__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_24__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_new_self = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1058
 * 
 *     def __mul__(self, other):
 *         if not isinstance(self, Tick):             # <<<<<<<<<<<<<<
 *             # TODO(cython3), remove this, this moved to __rmul__
 *             # cython semantics, this is __rmul__
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1061
 *             # TODO(cython3), remove this, this moved to __rmul__
 *             # cython semantics, this is __rmul__
 *             return other.__mul__(self)             # <<<<<<<<<<<<<<
 *         if is_float_object(other):
 *             n = other * self.n
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_mul); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1058
 * 
 *     def __mul__(self, other):
 *         if not isinstance(self, Tick):             # <<<<<<<<<<<<<<
 *             # TODO(cython3), remove this, this moved to __rmul__
 *             # cython semantics, this is __rmul__
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1062
 *             # cython semantics, this is __rmul__
 *             return other.__mul__(self)
 *         if is_float_object(other):             # <<<<<<<<<<<<<<
 *             n = other * self.n
 *             # If the new `n` is an integer, we can represent it using the
 */
  __pyx_t_2 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_float_object(__pyx_v_other) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1063
 *             return other.__mul__(self)
 *         if is_float_object(other):
 *             n = other * self.n             # <<<<<<<<<<<<<<
 *             # If the new `n` is an integer, we can represent it using the
 *             #  same Tick subclass as self, otherwise we need to move up
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_other, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_n = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1067
 *             #  same Tick subclass as self, otherwise we need to move up
 *             #  to a higher-resolution subclass
 *             if np.isclose(n % 1, 0):             # <<<<<<<<<<<<<<
 *                 return type(self)(int(n))
 *             new_self = self._next_higher_resolution()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_RemainderObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_int_0};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_int_0};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_0);
      __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/_libs/tslibs/offsets.pyx":1068
 *             #  to a higher-resolution subclass
 *             if np.isclose(n % 1, 0):
 *                 return type(self)(int(n))             # <<<<<<<<<<<<<<
 *             new_self = self._next_higher_resolution()
 *             return new_self * other
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self)));
      __pyx_t_8 = ((PyObject *)Py_TYPE(__pyx_v_self)); __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1067
 *             #  same Tick subclass as self, otherwise we need to move up
 *             #  to a higher-resolution subclass
 *             if np.isclose(n % 1, 0):             # <<<<<<<<<<<<<<
 *                 return type(self)(int(n))
 *             new_self = self._next_higher_resolution()
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1069
 *             if np.isclose(n % 1, 0):
 *                 return type(self)(int(n))
 *             new_self = self._next_higher_resolution()             # <<<<<<<<<<<<<<
 *             return new_self * other
 *         return BaseOffset.__mul__(self, other)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next_higher_resolution); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_new_self = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1070
 *                 return type(self)(int(n))
 *             new_self = self._next_higher_resolution()
 *             return new_self * other             # <<<<<<<<<<<<<<
 *         return BaseOffset.__mul__(self, other)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_new_self, __pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1062
 *             # cython semantics, this is __rmul__
 *             return other.__mul__(self)
 *         if is_float_object(other):             # <<<<<<<<<<<<<<
 *             n = other * self.n
 *             # If the new `n` is an integer, we can represent it using the
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1071
 *             new_self = self._next_higher_resolution()
 *             return new_self * other
 *         return BaseOffset.__mul__(self, other)             # <<<<<<<<<<<<<<
 * 
 *     def __rmul__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_mul); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_other};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_other};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_v_other);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1057
 *         return self.delta.__gt__(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, Tick):
 *             # TODO(cython3), remove this, this moved to __rmul__
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_new_self);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1073
 *         return BaseOffset.__mul__(self, other)
 * 
 *     def __rmul__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__mul__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_27__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_27__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_26__rmul__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1074
 * 
 *     def __rmul__(self, other):
 *         return self.__mul__(other)             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1073
 *         return BaseOffset.__mul__(self, other)
 * 
 *     def __rmul__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__mul__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1076
 *         return self.__mul__(other)
 * 
 *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, Tick):
 *             # cython semantics mean the args are sometimes swapped
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_29__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_29__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_28__truediv__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1077
 * 
 *     def __truediv__(self, other):
 *         if not isinstance(self, Tick):             # <<<<<<<<<<<<<<
 *             # cython semantics mean the args are sometimes swapped
 *             result = other.delta.__rtruediv__(self)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1079
 *         if not isinstance(self, Tick):
 *             # cython semantics mean the args are sometimes swapped
 *             result = other.delta.__rtruediv__(self)             # <<<<<<<<<<<<<<
 *         else:
 *             result = self.delta.__truediv__(other)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_delta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rtruediv); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1077
 * 
 *     def __truediv__(self, other):
 *         if not isinstance(self, Tick):             # <<<<<<<<<<<<<<
 *             # cython semantics mean the args are sometimes swapped
 *             result = other.delta.__rtruediv__(self)
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1081
 *             result = other.delta.__rtruediv__(self)
 *         else:
 *             result = self.delta.__truediv__(other)             # <<<<<<<<<<<<<<
 *         return _wrap_timedelta_result(result)
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_truediv); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_other);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1082
 *         else:
 *             result = self.delta.__truediv__(other)
 *         return _wrap_timedelta_result(result)             # <<<<<<<<<<<<<<
 * 
 *     def __rtruediv__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__wrap_timedelta_result(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1076
 *         return self.__mul__(other)
 * 
 *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, Tick):
 *             # cython semantics mean the args are sometimes swapped
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1084
 *         return _wrap_timedelta_result(result)
 * 
 *     def __rtruediv__(self, other):             # <<<<<<<<<<<<<<
 *         result = self.delta.__rtruediv__(other)
 *         return _wrap_timedelta_result(result)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_31__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_31__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rtruediv__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_30__rtruediv__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_30__rtruediv__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rtruediv__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1085
 * 
 *     def __rtruediv__(self, other):
 *         result = self.delta.__rtruediv__(other)             # <<<<<<<<<<<<<<
 *         return _wrap_timedelta_result(result)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rtruediv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1086
 *     def __rtruediv__(self, other):
 *         result = self.delta.__rtruediv__(other)
 *         return _wrap_timedelta_result(result)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__wrap_timedelta_result(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1084
 *         return _wrap_timedelta_result(result)
 * 
 *     def __rtruediv__(self, other):             # <<<<<<<<<<<<<<
 *         result = self.delta.__rtruediv__(other)
 *         return _wrap_timedelta_result(result)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1088
 *         return _wrap_timedelta_result(result)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, Tick):
 *             # cython semantics; this is __radd__
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_33__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_33__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_32__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_32__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __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("__add__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1089
 * 
 *     def __add__(self, other):
 *         if not isinstance(self, Tick):             # <<<<<<<<<<<<<<
 *             # cython semantics; this is __radd__
 *             # TODO(cython3): remove this, this moved to __radd__
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1092
 *             # cython semantics; this is __radd__
 *             # TODO(cython3): remove this, this moved to __radd__
 *             return other.__add__(self)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(other, Tick):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1089
 * 
 *     def __add__(self, other):
 *         if not isinstance(self, Tick):             # <<<<<<<<<<<<<<
 *             # cython semantics; this is __radd__
 *             # TODO(cython3): remove this, this moved to __radd__
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1094
 *             return other.__add__(self)
 * 
 *         if isinstance(other, Tick):             # <<<<<<<<<<<<<<
 *             if type(self) == type(other):
 *                 return type(self)(self.n + other.n)
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1095
 * 
 *         if isinstance(other, Tick):
 *             if type(self) == type(other):             # <<<<<<<<<<<<<<
 *                 return type(self)(self.n + other.n)
 *             else:
 */
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_self)), ((PyObject *)Py_TYPE(__pyx_v_other)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1096
 *         if isinstance(other, Tick):
 *             if type(self) == type(other):
 *                 return type(self)(self.n + other.n)             # <<<<<<<<<<<<<<
 *             else:
 *                 return delta_to_tick(self.delta + other.delta)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self)));
      __pyx_t_5 = ((PyObject *)Py_TYPE(__pyx_v_self)); __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1095
 * 
 *         if isinstance(other, Tick):
 *             if type(self) == type(other):             # <<<<<<<<<<<<<<
 *                 return type(self)(self.n + other.n)
 *             else:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1098
 *                 return type(self)(self.n + other.n)
 *             else:
 *                 return delta_to_tick(self.delta + other.delta)             # <<<<<<<<<<<<<<
 *         try:
 *             return self._apply(other)
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_delta_to_tick); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_delta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1094
 *             return other.__add__(self)
 * 
 *         if isinstance(other, Tick):             # <<<<<<<<<<<<<<
 *             if type(self) == type(other):
 *                 return type(self)(self.n + other.n)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1099
 *             else:
 *                 return delta_to_tick(self.delta + other.delta)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._apply(other)
 *         except ApplyTypeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "pandas/_libs/tslibs/offsets.pyx":1100
 *                 return delta_to_tick(self.delta + other.delta)
 *         try:
 *             return self._apply(other)             # <<<<<<<<<<<<<<
 *         except ApplyTypeError:
 *             # Includes pd.Period
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_apply); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_other);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L10_try_return;

      /* "pandas/_libs/tslibs/offsets.pyx":1099
 *             else:
 *                 return delta_to_tick(self.delta + other.delta)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._apply(other)
 *         except ApplyTypeError:
 */
    }
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1101
 *         try:
 *             return self._apply(other)
 *         except ApplyTypeError:             # <<<<<<<<<<<<<<
 *             # Includes pd.Period
 *             return NotImplemented
 */
    __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_5, &__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ApplyTypeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L8_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_3, __pyx_t_5, __pyx_t_7);
    __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0;
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 1101, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/_libs/tslibs/offsets.pyx":1103
 *         except ApplyTypeError:
 *             # Includes pd.Period
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         except OverflowError as err:
 *             raise OverflowError(
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L9_except_return;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1104
 *             # Includes pd.Period
 *             return NotImplemented
 *         except OverflowError as err:             # <<<<<<<<<<<<<<
 *             raise OverflowError(
 *                 f"the add operation between {self} and {other} will overflow"
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 1104, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_err = __pyx_t_5;
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":1106
 *         except OverflowError as err:
 *             raise OverflowError(
 *                 f"the add operation between {self} and {other} will overflow"             # <<<<<<<<<<<<<<
 *             ) from err
 * 
 */
        __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = 0;
        __pyx_t_13 = 127;
        __Pyx_INCREF(__pyx_kp_u_the_add_operation_between);
        __pyx_t_12 += 26;
        __Pyx_GIVEREF(__pyx_kp_u_the_add_operation_between);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_the_add_operation_between);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_self, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_INCREF(__pyx_kp_u_and);
        __pyx_t_12 += 5;
        __Pyx_GIVEREF(__pyx_kp_u_and);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_and);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_other, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_INCREF(__pyx_kp_u_will_overflow);
        __pyx_t_12 += 14;
        __Pyx_GIVEREF(__pyx_kp_u_will_overflow);
        PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_will_overflow);
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1105
 *             return NotImplemented
 *         except OverflowError as err:
 *             raise OverflowError(             # <<<<<<<<<<<<<<
 *                 f"the add operation between {self} and {other} will overflow"
 *             ) from err
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OverflowError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1107
 *             raise OverflowError(
 *                 f"the add operation between {self} and {other} will overflow"
 *             ) from err             # <<<<<<<<<<<<<<
 * 
 *     def __radd__(self, other):
 */
        __Pyx_Raise(__pyx_t_4, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 1105, __pyx_L19_error)
      }

      /* "pandas/_libs/tslibs/offsets.pyx":1104
 *             # Includes pd.Period
 *             return NotImplemented
 *         except OverflowError as err:             # <<<<<<<<<<<<<<
 *             raise OverflowError(
 *                 f"the add operation between {self} and {other} will overflow"
 */
      /*finally:*/ {
        __pyx_L19_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_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          if ((PY_MAJOR_VERSION < 3) || 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_11 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err);
            __pyx_v_err = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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_11; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
          goto __pyx_L8_except_error;
        }
      }
    }
    goto __pyx_L8_except_error;
    __pyx_L8_except_error:;

    /* "pandas/_libs/tslibs/offsets.pyx":1099
 *             else:
 *                 return delta_to_tick(self.delta + other.delta)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._apply(other)
 *         except ApplyTypeError:
 */
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L0;
    __pyx_L9_except_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1088
 *         return _wrap_timedelta_result(result)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(self, Tick):
 *             # cython semantics; this is __radd__
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1109
 *             ) from err
 * 
 *     def __radd__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__add__(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_35__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_35__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_34__radd__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1110
 * 
 *     def __radd__(self, other):
 *         return self.__add__(other)             # <<<<<<<<<<<<<<
 * 
 *     def _apply(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1109
 *             ) from err
 * 
 *     def __radd__(self, other):             # <<<<<<<<<<<<<<
 *         return self.__add__(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1112
 *         return self.__add__(other)
 * 
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         # Timestamp can handle tz and nano sec, thus no need to use apply_wraps
 *         if isinstance(other, _Timestamp):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_37_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_37_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_36_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":1114
 *     def _apply(self, other):
 *         # Timestamp can handle tz and nano sec, thus no need to use apply_wraps
 *         if isinstance(other, _Timestamp):             # <<<<<<<<<<<<<<
 *             # GH#15126
 *             return other + self.delta
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1116
 *         if isinstance(other, _Timestamp):
 *             # GH#15126
 *             return other + self.delta             # <<<<<<<<<<<<<<
 *         elif other is NaT:
 *             return NaT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Add(__pyx_v_other, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1114
 *     def _apply(self, other):
 *         # Timestamp can handle tz and nano sec, thus no need to use apply_wraps
 *         if isinstance(other, _Timestamp):             # <<<<<<<<<<<<<<
 *             # GH#15126
 *             return other + self.delta
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1117
 *             # GH#15126
 *             return other + self.delta
 *         elif other is NaT:             # <<<<<<<<<<<<<<
 *             return NaT
 *         elif is_datetime64_object(other) or PyDate_Check(other):
 */
  __pyx_t_2 = (__pyx_v_other == ((PyObject *)__pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1118
 *             return other + self.delta
 *         elif other is NaT:
 *             return NaT             # <<<<<<<<<<<<<<
 *         elif is_datetime64_object(other) or PyDate_Check(other):
 *             # PyDate_Check includes date, datetime
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT));
    __pyx_r = ((PyObject *)__pyx_v_6pandas_5_libs_6tslibs_7nattype_c_NaT);
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1117
 *             # GH#15126
 *             return other + self.delta
 *         elif other is NaT:             # <<<<<<<<<<<<<<
 *             return NaT
 *         elif is_datetime64_object(other) or PyDate_Check(other):
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1119
 *         elif other is NaT:
 *             return NaT
 *         elif is_datetime64_object(other) or PyDate_Check(other):             # <<<<<<<<<<<<<<
 *             # PyDate_Check includes date, datetime
 *             return Timestamp(other) + self
 */
  __pyx_t_2 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_datetime64_object(__pyx_v_other) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (PyDate_Check(__pyx_v_other) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1121
 *         elif is_datetime64_object(other) or PyDate_Check(other):
 *             # PyDate_Check includes date, datetime
 *             return Timestamp(other) + self             # <<<<<<<<<<<<<<
 * 
 *         if util.is_timedelta64_object(other) or PyDelta_Check(other):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1119
 *         elif other is NaT:
 *             return NaT
 *         elif is_datetime64_object(other) or PyDate_Check(other):             # <<<<<<<<<<<<<<
 *             # PyDate_Check includes date, datetime
 *             return Timestamp(other) + self
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1123
 *             return Timestamp(other) + self
 * 
 *         if util.is_timedelta64_object(other) or PyDelta_Check(other):             # <<<<<<<<<<<<<<
 *             return other + self.delta
 *         elif isinstance(other, type(self)):
 */
  __pyx_t_2 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_timedelta64_object(__pyx_v_other) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = (PyDelta_Check(__pyx_v_other) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1124
 * 
 *         if util.is_timedelta64_object(other) or PyDelta_Check(other):
 *             return other + self.delta             # <<<<<<<<<<<<<<
 *         elif isinstance(other, type(self)):
 *             # TODO(2.0): remove once apply deprecation is enforced.
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Add(__pyx_v_other, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1123
 *             return Timestamp(other) + self
 * 
 *         if util.is_timedelta64_object(other) or PyDelta_Check(other):             # <<<<<<<<<<<<<<
 *             return other + self.delta
 *         elif isinstance(other, type(self)):
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1125
 *         if util.is_timedelta64_object(other) or PyDelta_Check(other):
 *             return other + self.delta
 *         elif isinstance(other, type(self)):             # <<<<<<<<<<<<<<
 *             # TODO(2.0): remove once apply deprecation is enforced.
 *             #  This is reached in tests that specifically call apply,
 */
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1125, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1130
 *             #  but should not be reached "naturally" because __add__ should
 *             #  catch this case first.
 *             return type(self)(self.n + other.n)             # <<<<<<<<<<<<<<
 * 
 *         raise ApplyTypeError(f"Unhandled type: {type(other).__name__}")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __pyx_t_5 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1125
 *         if util.is_timedelta64_object(other) or PyDelta_Check(other):
 *             return other + self.delta
 *         elif isinstance(other, type(self)):             # <<<<<<<<<<<<<<
 *             # TODO(2.0): remove once apply deprecation is enforced.
 *             #  This is reached in tests that specifically call apply,
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1132
 *             return type(self)(self.n + other.n)
 * 
 *         raise ApplyTypeError(f"Unhandled type: {type(other).__name__}")             # <<<<<<<<<<<<<<
 * 
 *     # --------------------------------------------------------------------
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ApplyTypeError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unhandled_type, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(0, 1132, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1112
 *         return self.__add__(other)
 * 
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         # Timestamp can handle tz and nano sec, thus no need to use apply_wraps
 *         if isinstance(other, _Timestamp):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1137
 *     # Pickle Methods
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state["n"]
 *         self.normalize = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_39__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_39__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_38__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Tick_38__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1138
 * 
 *     def __setstate__(self, state):
 *         self.n = state["n"]             # <<<<<<<<<<<<<<
 *         self.normalize = False
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_2;

  /* "pandas/_libs/tslibs/offsets.pyx":1139
 *     def __setstate__(self, state):
 *         self.n = state["n"]
 *         self.normalize = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->__pyx_base.__pyx_base.normalize = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1137
 *     # Pickle Methods
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state["n"]
 *         self.normalize = False
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Tick.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1198
 * 
 * 
 * def delta_to_tick(delta: timedelta) -> Tick:             # <<<<<<<<<<<<<<
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:
 *         # nanoseconds only for pd.Timedelta
 */

/* Python wrapper */
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_7delta_to_tick(PyObject *__pyx_self, PyObject *__pyx_v_delta); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_7delta_to_tick = {"delta_to_tick", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_7delta_to_tick, METH_O, 0};
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_7delta_to_tick(PyObject *__pyx_self, PyObject *__pyx_v_delta) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delta_to_tick (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_delta), __pyx_ptype_7cpython_8datetime_timedelta, 1, "delta", 0))) __PYX_ERR(0, 1198, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6delta_to_tick(__pyx_self, ((PyDateTime_Delta *)__pyx_v_delta));

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

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6delta_to_tick(CYTHON_UNUSED PyObject *__pyx_self, PyDateTime_Delta *__pyx_v_delta) {
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_v_nanos = NULL;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delta_to_tick", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1199
 * 
 * def delta_to_tick(delta: timedelta) -> Tick:
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:             # <<<<<<<<<<<<<<
 *         # nanoseconds only for pd.Timedelta
 *         if delta.seconds == 0:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_delta), __pyx_n_s_microseconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_delta), __pyx_n_u_nanoseconds, __pyx_int_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1201
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:
 *         # nanoseconds only for pd.Timedelta
 *         if delta.seconds == 0:             # <<<<<<<<<<<<<<
 *             return Day(delta.days)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_delta), __pyx_n_s_seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1202
 *         # nanoseconds only for pd.Timedelta
 *         if delta.seconds == 0:
 *             return Day(delta.days)             # <<<<<<<<<<<<<<
 *         else:
 *             seconds = delta.days * 86400 + delta.seconds
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_delta), __pyx_n_s_days); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1201
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:
 *         # nanoseconds only for pd.Timedelta
 *         if delta.seconds == 0:             # <<<<<<<<<<<<<<
 *             return Day(delta.days)
 *         else:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1204
 *             return Day(delta.days)
 *         else:
 *             seconds = delta.days * 86400 + delta.seconds             # <<<<<<<<<<<<<<
 *             if seconds % 3600 == 0:
 *                 return Hour(seconds / 3600)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_delta), __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_86400); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_delta), __pyx_n_s_seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_seconds = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1205
 *         else:
 *             seconds = delta.days * 86400 + delta.seconds
 *             if seconds % 3600 == 0:             # <<<<<<<<<<<<<<
 *                 return Hour(seconds / 3600)
 *             elif seconds % 60 == 0:
 */
      __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_v_seconds, __pyx_int_3600, 0xE10, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pandas/_libs/tslibs/offsets.pyx":1206
 *             seconds = delta.days * 86400 + delta.seconds
 *             if seconds % 3600 == 0:
 *                 return Hour(seconds / 3600)             # <<<<<<<<<<<<<<
 *             elif seconds % 60 == 0:
 *                 return Minute(seconds / 60)
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_2 = __Pyx_PyInt_TrueDivideObjC(__pyx_v_seconds, __pyx_int_3600, 0xE10, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour), __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pandas/_libs/tslibs/offsets.pyx":1205
 *         else:
 *             seconds = delta.days * 86400 + delta.seconds
 *             if seconds % 3600 == 0:             # <<<<<<<<<<<<<<
 *                 return Hour(seconds / 3600)
 *             elif seconds % 60 == 0:
 */
      }

      /* "pandas/_libs/tslibs/offsets.pyx":1207
 *             if seconds % 3600 == 0:
 *                 return Hour(seconds / 3600)
 *             elif seconds % 60 == 0:             # <<<<<<<<<<<<<<
 *                 return Minute(seconds / 60)
 *             else:
 */
      __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_v_seconds, __pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1207, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pandas/_libs/tslibs/offsets.pyx":1208
 *                 return Hour(seconds / 3600)
 *             elif seconds % 60 == 0:
 *                 return Minute(seconds / 60)             # <<<<<<<<<<<<<<
 *             else:
 *                 return Second(seconds)
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_2 = __Pyx_PyInt_TrueDivideObjC(__pyx_v_seconds, __pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute), __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pandas/_libs/tslibs/offsets.pyx":1207
 *             if seconds % 3600 == 0:
 *                 return Hour(seconds / 3600)
 *             elif seconds % 60 == 0:             # <<<<<<<<<<<<<<
 *                 return Minute(seconds / 60)
 *             else:
 */
      }

      /* "pandas/_libs/tslibs/offsets.pyx":1210
 *                 return Minute(seconds / 60)
 *             else:
 *                 return Second(seconds)             # <<<<<<<<<<<<<<
 *     else:
 *         nanos = delta_to_nanoseconds(delta)
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second), __pyx_v_seconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;
      }
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1199
 * 
 * def delta_to_tick(delta: timedelta) -> Tick:
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:             # <<<<<<<<<<<<<<
 *         # nanoseconds only for pd.Timedelta
 *         if delta.seconds == 0:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1212
 *                 return Second(seconds)
 *     else:
 *         nanos = delta_to_nanoseconds(delta)             # <<<<<<<<<<<<<<
 *         if nanos % 1_000_000 == 0:
 *             return Milli(nanos // 1_000_000)
 */
  /*else*/ {
    __pyx_t_6 = __pyx_f_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds(((PyObject *)__pyx_v_delta), 0, NULL); if (unlikely(__pyx_t_6 == ((__pyx_t_5numpy_int64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1212, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_nanos = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1213
 *     else:
 *         nanos = delta_to_nanoseconds(delta)
 *         if nanos % 1_000_000 == 0:             # <<<<<<<<<<<<<<
 *             return Milli(nanos // 1_000_000)
 *         elif nanos % 1000 == 0:
 */
    __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_v_nanos, __pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1214
 *         nanos = delta_to_nanoseconds(delta)
 *         if nanos % 1_000_000 == 0:
 *             return Milli(nanos // 1_000_000)             # <<<<<<<<<<<<<<
 *         elif nanos % 1000 == 0:
 *             return Micro(nanos // 1000)
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_nanos, __pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli), __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1213
 *     else:
 *         nanos = delta_to_nanoseconds(delta)
 *         if nanos % 1_000_000 == 0:             # <<<<<<<<<<<<<<
 *             return Milli(nanos // 1_000_000)
 *         elif nanos % 1000 == 0:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1215
 *         if nanos % 1_000_000 == 0:
 *             return Milli(nanos // 1_000_000)
 *         elif nanos % 1000 == 0:             # <<<<<<<<<<<<<<
 *             return Micro(nanos // 1000)
 *         else:  # pragma: no cover
 */
    __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_v_nanos, __pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1216
 *             return Milli(nanos // 1_000_000)
 *         elif nanos % 1000 == 0:
 *             return Micro(nanos // 1000)             # <<<<<<<<<<<<<<
 *         else:  # pragma: no cover
 *             return Nano(nanos)
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_nanos, __pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro), __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1215
 *         if nanos % 1_000_000 == 0:
 *             return Milli(nanos // 1_000_000)
 *         elif nanos % 1000 == 0:             # <<<<<<<<<<<<<<
 *             return Micro(nanos // 1000)
 *         else:  # pragma: no cover
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1218
 *             return Micro(nanos // 1000)
 *         else:  # pragma: no cover
 *             return Nano(nanos)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano), __pyx_v_nanos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1198
 * 
 * 
 * def delta_to_tick(delta: timedelta) -> Tick:             # <<<<<<<<<<<<<<
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:
 *         # nanoseconds only for pd.Timedelta
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.delta_to_tick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XDECREF(__pyx_v_nanos);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1230
 *     _adjust_dst = False
 * 
 *     def __init__(self, n=1, normalize=False, **kwds):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_kwds = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return -1;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1230, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1230, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_kwds);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_off = NULL;
  PyObject *__pyx_v_use_rd = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1231
 * 
 *     def __init__(self, n=1, normalize=False, **kwds):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 * 
 *         off, use_rd = _determine_offset(kwds)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1233
 *         BaseOffset.__init__(self, n, normalize)
 * 
 *         off, use_rd = _determine_offset(kwds)             # <<<<<<<<<<<<<<
 *         object.__setattr__(self, "_offset", off)
 *         object.__setattr__(self, "_use_relativedelta", use_rd)
 */
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(__pyx_v_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    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, 1233, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1233, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1233, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_off = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_use_rd = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1234
 * 
 *         off, use_rd = _determine_offset(kwds)
 *         object.__setattr__(self, "_offset", off)             # <<<<<<<<<<<<<<
 *         object.__setattr__(self, "_use_relativedelta", use_rd)
 *         for key in kwds:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_n_u_offset, __pyx_v_off};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_n_u_offset, __pyx_v_off};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_n_u_offset);
    __Pyx_GIVEREF(__pyx_n_u_offset);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_u_offset);
    __Pyx_INCREF(__pyx_v_off);
    __Pyx_GIVEREF(__pyx_v_off);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_4, __pyx_v_off);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1235
 *         off, use_rd = _determine_offset(kwds)
 *         object.__setattr__(self, "_offset", off)
 *         object.__setattr__(self, "_use_relativedelta", use_rd)             # <<<<<<<<<<<<<<
 *         for key in kwds:
 *             val = kwds[key]
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_n_u_use_relativedelta, __pyx_v_use_rd};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_n_u_use_relativedelta, __pyx_v_use_rd};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_n_u_use_relativedelta);
    __Pyx_GIVEREF(__pyx_n_u_use_relativedelta);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, __pyx_n_u_use_relativedelta);
    __Pyx_INCREF(__pyx_v_use_rd);
    __Pyx_GIVEREF(__pyx_v_use_rd);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_4, __pyx_v_use_rd);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1236
 *         object.__setattr__(self, "_offset", off)
 *         object.__setattr__(self, "_use_relativedelta", use_rd)
 *         for key in kwds:             # <<<<<<<<<<<<<<
 *             val = kwds[key]
 *             object.__setattr__(self, key, val)
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_kwds, 1, ((PyObject *)NULL), (&__pyx_t_8), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, &__pyx_t_5, NULL, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1237
 *         object.__setattr__(self, "_use_relativedelta", use_rd)
 *         for key in kwds:
 *             val = kwds[key]             # <<<<<<<<<<<<<<
 *             object.__setattr__(self, key, val)
 * 
 */
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1238
 *         for key in kwds:
 *             val = kwds[key]
 *             object.__setattr__(self, key, val)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_key, __pyx_v_val};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_key, __pyx_v_val};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, ((PyObject *)__pyx_v_self));
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_v_val);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1230
 *     _adjust_dst = False
 * 
 *     def __init__(self, n=1, normalize=False, **kwds):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_off);
  __Pyx_XDECREF(__pyx_v_use_rd);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1240
 *             object.__setattr__(self, key, val)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a pickleable state
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_2__getstate__[] = "\n        Return a pickleable state\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_2__getstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_2__getstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self) {
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1246
 *         # RelativeDeltaOffset (technically DateOffset) is the only non-cdef
 *         #  class, so the only one with __dict__
 *         state = self.__dict__.copy()             # <<<<<<<<<<<<<<
 *         state["n"] = self.n
 *         state["normalize"] = self.normalize
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_state = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1247
 *         #  class, so the only one with __dict__
 *         state = self.__dict__.copy()
 *         state["n"] = self.n             # <<<<<<<<<<<<<<
 *         state["normalize"] = self.normalize
 *         return state
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_n_u_n, __pyx_t_1) < 0)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1248
 *         state = self.__dict__.copy()
 *         state["n"] = self.n
 *         state["normalize"] = self.normalize             # <<<<<<<<<<<<<<
 *         return state
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.normalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_n_u_normalize, __pyx_t_1) < 0)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1249
 *         state["n"] = self.n
 *         state["normalize"] = self.normalize
 *         return state             # <<<<<<<<<<<<<<
 * 
 *     def __setstate__(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_state);
  __pyx_r = __pyx_v_state;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1240
 *             object.__setattr__(self, key, val)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a pickleable state
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1251
 *         return state
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         """
 *         Reconstruct an instance from a pickled state
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_4__setstate__[] = "\n        Reconstruct an instance from a pickled state\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_4__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_4__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1256
 *         """
 * 
 *         if "offset" in state:             # <<<<<<<<<<<<<<
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             if "_offset" in state:  # pragma: no cover
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_offset_2, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1258
 *         if "offset" in state:
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             if "_offset" in state:  # pragma: no cover             # <<<<<<<<<<<<<<
 *                 raise AssertionError("Unexpected key `_offset`")
 *             state["_offset"] = state.pop("offset")
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_offset, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1258, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pandas/_libs/tslibs/offsets.pyx":1259
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             if "_offset" in state:  # pragma: no cover
 *                 raise AssertionError("Unexpected key `_offset`")             # <<<<<<<<<<<<<<
 *             state["_offset"] = state.pop("offset")
 *             state["kwds"]["offset"] = state["_offset"]
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1259, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":1258
 *         if "offset" in state:
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             if "_offset" in state:  # pragma: no cover             # <<<<<<<<<<<<<<
 *                 raise AssertionError("Unexpected key `_offset`")
 *             state["_offset"] = state.pop("offset")
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1260
 *             if "_offset" in state:  # pragma: no cover
 *                 raise AssertionError("Unexpected key `_offset`")
 *             state["_offset"] = state.pop("offset")             # <<<<<<<<<<<<<<
 *             state["kwds"]["offset"] = state["_offset"]
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_u_offset_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_offset_2);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_n_u_offset, __pyx_t_3) < 0)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1261
 *                 raise AssertionError("Unexpected key `_offset`")
 *             state["_offset"] = state.pop("offset")
 *             state["kwds"]["offset"] = state["_offset"]             # <<<<<<<<<<<<<<
 * 
 *         self.n = state.pop("n")
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_kwds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_offset_2, __pyx_t_3) < 0)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1256
 *         """
 * 
 *         if "offset" in state:             # <<<<<<<<<<<<<<
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             if "_offset" in state:  # pragma: no cover
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1263
 *             state["kwds"]["offset"] = state["_offset"]
 * 
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self._cache = state.pop("_cache", {})
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_6 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->__pyx_base.n = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":1264
 * 
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self._cache = state.pop("_cache", {})
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->__pyx_base.normalize = __pyx_t_1;

  /* "pandas/_libs/tslibs/offsets.pyx":1265
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self._cache = state.pop("_cache", {})             # <<<<<<<<<<<<<<
 * 
 *         self.__dict__.update(state)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_cache, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_cache, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_n_u_cache);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._cache);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._cache);
  __pyx_v_self->__pyx_base._cache = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1267
 *         self._cache = state.pop("_cache", {})
 * 
 *         self.__dict__.update(state)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_state);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1251
 *         return state
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         """
 *         Reconstruct an instance from a pickled state
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1270
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         if self._use_relativedelta:
 *             other = _as_datetime(other)
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_7_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_7_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 1270, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_6_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_6_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_tzinfo = NULL;
  PyObject *__pyx_v_td_nano = NULL;
  CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_i;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_8;
  __pyx_t_5numpy_int64_t __pyx_t_9;
  __pyx_t_5numpy_int64_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":1271
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         if self._use_relativedelta:             # <<<<<<<<<<<<<<
 *             other = _as_datetime(other)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_use_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1272
 *     def _apply(self, other: datetime) -> datetime:
 *         if self._use_relativedelta:
 *             other = _as_datetime(other)             # <<<<<<<<<<<<<<
 * 
 *         if len(self.kwds) > 0:
 */
    __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets__as_datetime(__pyx_v_other)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1271
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         if self._use_relativedelta:             # <<<<<<<<<<<<<<
 *             other = _as_datetime(other)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1274
 *             other = _as_datetime(other)
 * 
 *         if len(self.kwds) > 0:             # <<<<<<<<<<<<<<
 *             tzinfo = getattr(other, "tzinfo", None)
 *             if tzinfo is not None and self._use_relativedelta:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1275
 * 
 *         if len(self.kwds) > 0:
 *             tzinfo = getattr(other, "tzinfo", None)             # <<<<<<<<<<<<<<
 *             if tzinfo is not None and self._use_relativedelta:
 *                 # perform calculation in UTC
 */
    __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_other), __pyx_n_u_tzinfo, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_tzinfo = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1276
 *         if len(self.kwds) > 0:
 *             tzinfo = getattr(other, "tzinfo", None)
 *             if tzinfo is not None and self._use_relativedelta:             # <<<<<<<<<<<<<<
 *                 # perform calculation in UTC
 *                 other = other.replace(tzinfo=None)
 */
    __pyx_t_4 = (__pyx_v_tzinfo != Py_None);
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (__pyx_t_5) {
    } else {
      __pyx_t_2 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_use_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_2) {

      /* "pandas/_libs/tslibs/offsets.pyx":1278
 *             if tzinfo is not None and self._use_relativedelta:
 *                 # perform calculation in UTC
 *                 other = other.replace(tzinfo=None)             # <<<<<<<<<<<<<<
 * 
 *             if hasattr(self, "nanoseconds"):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_tzinfo, Py_None) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1278, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1276
 *         if len(self.kwds) > 0:
 *             tzinfo = getattr(other, "tzinfo", None)
 *             if tzinfo is not None and self._use_relativedelta:             # <<<<<<<<<<<<<<
 *                 # perform calculation in UTC
 *                 other = other.replace(tzinfo=None)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1280
 *                 other = other.replace(tzinfo=None)
 * 
 *             if hasattr(self, "nanoseconds"):             # <<<<<<<<<<<<<<
 *                 td_nano = Timedelta(nanoseconds=self.nanoseconds)
 *             else:
 */
    __pyx_t_2 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_u_nanoseconds); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1280, __pyx_L1_error)
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1281
 * 
 *             if hasattr(self, "nanoseconds"):
 *                 td_nano = Timedelta(nanoseconds=self.nanoseconds)             # <<<<<<<<<<<<<<
 *             else:
 *                 td_nano = Timedelta(0)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nanoseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_nanoseconds, __pyx_t_1) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_td_nano = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1280
 *                 other = other.replace(tzinfo=None)
 * 
 *             if hasattr(self, "nanoseconds"):             # <<<<<<<<<<<<<<
 *                 td_nano = Timedelta(nanoseconds=self.nanoseconds)
 *             else:
 */
      goto __pyx_L8;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1283
 *                 td_nano = Timedelta(nanoseconds=self.nanoseconds)
 *             else:
 *                 td_nano = Timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *             if self.n > 0:
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_0);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_td_nano = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L8:;

    /* "pandas/_libs/tslibs/offsets.pyx":1285
 *                 td_nano = Timedelta(0)
 * 
 *             if self.n > 0:             # <<<<<<<<<<<<<<
 *                 for i in range(self.n):
 *                     other = other + self._offset + td_nano
 */
    __pyx_t_5 = ((__pyx_v_self->__pyx_base.n > 0) != 0);
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1286
 * 
 *             if self.n > 0:
 *                 for i in range(self.n):             # <<<<<<<<<<<<<<
 *                     other = other + self._offset + td_nano
 *             else:
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.n;
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_i = __pyx_t_10;

        /* "pandas/_libs/tslibs/offsets.pyx":1287
 *             if self.n > 0:
 *                 for i in range(self.n):
 *                     other = other + self._offset + td_nano             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(-self.n):
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_v_other), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1287, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_v_td_nano); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1287, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_1));
        __pyx_t_1 = 0;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":1285
 *                 td_nano = Timedelta(0)
 * 
 *             if self.n > 0:             # <<<<<<<<<<<<<<
 *                 for i in range(self.n):
 *                     other = other + self._offset + td_nano
 */
      goto __pyx_L9;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1289
 *                     other = other + self._offset + td_nano
 *             else:
 *                 for i in range(-self.n):             # <<<<<<<<<<<<<<
 *                     other = other - self._offset - td_nano
 * 
 */
    /*else*/ {
      __pyx_t_8 = (-__pyx_v_self->__pyx_base.n);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_i = __pyx_t_10;

        /* "pandas/_libs/tslibs/offsets.pyx":1290
 *             else:
 *                 for i in range(-self.n):
 *                     other = other - self._offset - td_nano             # <<<<<<<<<<<<<<
 * 
 *             if tzinfo is not None and self._use_relativedelta:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_other), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_v_td_nano); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1290, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_1));
        __pyx_t_1 = 0;
      }
    }
    __pyx_L9:;

    /* "pandas/_libs/tslibs/offsets.pyx":1292
 *                     other = other - self._offset - td_nano
 * 
 *             if tzinfo is not None and self._use_relativedelta:             # <<<<<<<<<<<<<<
 *                 # bring tz back from UTC calculation
 *                 other = localize_pydatetime(other, tzinfo)
 */
    __pyx_t_2 = (__pyx_v_tzinfo != Py_None);
    __pyx_t_4 = (__pyx_t_2 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_use_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_t_4;
    __pyx_L15_bool_binop_done:;
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1294
 *             if tzinfo is not None and self._use_relativedelta:
 *                 # bring tz back from UTC calculation
 *                 other = localize_pydatetime(other, tzinfo)             # <<<<<<<<<<<<<<
 * 
 *             return Timestamp(other)
 */
      if (!(likely(((__pyx_v_tzinfo) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_tzinfo, __pyx_ptype_7cpython_8datetime_tzinfo))))) __PYX_ERR(0, 1294, __pyx_L1_error)
      __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime(__pyx_v_other, ((PyDateTime_TZInfo *)__pyx_v_tzinfo), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1292
 *                     other = other - self._offset - td_nano
 * 
 *             if tzinfo is not None and self._use_relativedelta:             # <<<<<<<<<<<<<<
 *                 # bring tz back from UTC calculation
 *                 other = localize_pydatetime(other, tzinfo)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1296
 *                 other = localize_pydatetime(other, tzinfo)
 * 
 *             return Timestamp(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return other + timedelta(self.n)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_other));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1296, __pyx_L1_error)
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1274
 *             other = _as_datetime(other)
 * 
 *         if len(self.kwds) > 0:             # <<<<<<<<<<<<<<
 *             tzinfo = getattr(other, "tzinfo", None)
 *             if tzinfo is not None and self._use_relativedelta:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1298
 *             return Timestamp(other)
 *         else:
 *             return other + timedelta(self.n)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_other), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1298, __pyx_L1_error)
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1270
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         if self._use_relativedelta:
 *             other = _as_datetime(other)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XDECREF(__pyx_v_td_nano);
  __Pyx_XDECREF((PyObject *)__pyx_v_other);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1301
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         dt64other = np.asarray(dtarr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_9_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_9_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_8_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_8_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyObject *__pyx_v_dt64other = NULL;
  PyObject *__pyx_v_kwds = NULL;
  PyObject *__pyx_v_relativedelta_fast = NULL;
  PyObject *__pyx_v_months = NULL;
  PyObject *__pyx_v_shifted = NULL;
  PyObject *__pyx_v_weeks = NULL;
  PyObject *__pyx_v_delta = NULL;
  struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *__pyx_v_td = NULL;
  PyObject *__pyx_v_timedelta_kwds = NULL;
  PyObject *__pyx_v_num_nano = NULL;
  PyObject *__pyx_v_rem_nano = NULL;
  PyObject *__pyx_v_kwd = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_k = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  Py_UCS4 __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1302
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *         dt64other = np.asarray(dtarr)
 *         kwds = self.kwds
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 1302, __pyx_L1_error)
  __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1303
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         dt64other = np.asarray(dtarr)             # <<<<<<<<<<<<<<
 *         kwds = self.kwds
 *         relativedelta_fast = {
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_dtarr) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_dtarr);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_dt64other = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1304
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         dt64other = np.asarray(dtarr)
 *         kwds = self.kwds             # <<<<<<<<<<<<<<
 *         relativedelta_fast = {
 *             "years",
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_kwds = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1306
 *         kwds = self.kwds
 *         relativedelta_fast = {
 *             "years",             # <<<<<<<<<<<<<<
 *             "months",
 *             "weeks",
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PySet_Add(__pyx_t_1, __pyx_n_u_years) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_months) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_weeks) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_days) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_hours) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_minutes) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_seconds) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_microseconds) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  __pyx_v_relativedelta_fast = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1316
 *         }
 *         # relativedelta/_offset path only valid for base DateOffset
 *         if self._use_relativedelta and set(kwds).issubset(relativedelta_fast):             # <<<<<<<<<<<<<<
 * 
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_use_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PySet_New(__pyx_v_kwds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_issubset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_relativedelta_fast) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_relativedelta_fast);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":1318
 *         if self._use_relativedelta and set(kwds).issubset(relativedelta_fast):
 * 
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n             # <<<<<<<<<<<<<<
 *             if months:
 *                 shifted = shift_months(dt64other.view("i8"), months, reso=reso)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwds, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_int_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwds, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_months = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1319
 * 
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n
 *             if months:             # <<<<<<<<<<<<<<
 *                 shifted = shift_months(dt64other.view("i8"), months, reso=reso)
 *                 dt64other = shifted.view(dtarr.dtype)
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_months); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1319, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "pandas/_libs/tslibs/offsets.pyx":1320
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n
 *             if months:
 *                 shifted = shift_months(dt64other.view("i8"), months, reso=reso)             # <<<<<<<<<<<<<<
 *                 dt64other = shifted.view(dtarr.dtype)
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_shift_months); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt64other, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_i8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
      __Pyx_INCREF(__pyx_v_months);
      __Pyx_GIVEREF(__pyx_v_months);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_months);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(__pyx_v_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reso, __pyx_t_6) < 0) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_shifted = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1321
 *             if months:
 *                 shifted = shift_months(dt64other.view("i8"), months, reso=reso)
 *                 dt64other = shifted.view(dtarr.dtype)             # <<<<<<<<<<<<<<
 * 
 *             weeks = kwds.get("weeks", 0) * self.n
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shifted, __pyx_n_s_view); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt64other, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1319
 * 
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n
 *             if months:             # <<<<<<<<<<<<<<
 *                 shifted = shift_months(dt64other.view("i8"), months, reso=reso)
 *                 dt64other = shifted.view(dtarr.dtype)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1323
 *                 dt64other = shifted.view(dtarr.dtype)
 * 
 *             weeks = kwds.get("weeks", 0) * self.n             # <<<<<<<<<<<<<<
 *             if weeks:
 *                 delta = Timedelta(days=7 * weeks)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwds, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_weeks = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1324
 * 
 *             weeks = kwds.get("weeks", 0) * self.n
 *             if weeks:             # <<<<<<<<<<<<<<
 *                 delta = Timedelta(days=7 * weeks)
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_weeks); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1324, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "pandas/_libs/tslibs/offsets.pyx":1325
 *             weeks = kwds.get("weeks", 0) * self.n
 *             if weeks:
 *                 delta = Timedelta(days=7 * weeks)             # <<<<<<<<<<<<<<
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 *                 dt64other = dt64other + td
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = PyNumber_Multiply(__pyx_int_7, __pyx_v_weeks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_days, __pyx_t_3) < 0) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_delta = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1326
 *             if weeks:
 *                 delta = Timedelta(days=7 * weeks)
 *                 td = (<_Timedelta>delta)._as_reso(reso)             # <<<<<<<<<<<<<<
 *                 dt64other = dt64other + td
 * 
 */
      __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_v_delta)->__pyx_vtab)->_as_reso(((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_v_delta), __pyx_v_reso, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_td = ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1327
 *                 delta = Timedelta(days=7 * weeks)
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 *                 dt64other = dt64other + td             # <<<<<<<<<<<<<<
 * 
 *             timedelta_kwds = {
 */
      __pyx_t_3 = PyNumber_Add(__pyx_v_dt64other, ((PyObject *)__pyx_v_td)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_dt64other, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1324
 * 
 *             weeks = kwds.get("weeks", 0) * self.n
 *             if weeks:             # <<<<<<<<<<<<<<
 *                 delta = Timedelta(days=7 * weeks)
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1329
 *                 dt64other = dt64other + td
 * 
 *             timedelta_kwds = {             # <<<<<<<<<<<<<<
 *                 k: v
 *                 for k, v in kwds.items()
 */
    { /* enter inner scope */
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/_libs/tslibs/offsets.pyx":1331
 *             timedelta_kwds = {
 *                 k: v
 *                 for k, v in kwds.items()             # <<<<<<<<<<<<<<
 *                 if k in ["days", "hours", "minutes", "seconds", "microseconds"]
 *             }
 */
      __pyx_t_7 = 0;
      if (unlikely(__pyx_v_kwds == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 1331, __pyx_L10_error)
      }
      __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_kwds, 0, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __pyx_t_6 = __pyx_t_2;
      __pyx_t_2 = 0;
      while (1) {
        __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_8, &__pyx_t_7, &__pyx_t_2, &__pyx_t_1, NULL, __pyx_t_9);
        if (unlikely(__pyx_t_10 == 0)) break;
        if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1331, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_k, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_v, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1332
 *                 k: v
 *                 for k, v in kwds.items()
 *                 if k in ["days", "hours", "minutes", "seconds", "microseconds"]             # <<<<<<<<<<<<<<
 *             }
 *             if timedelta_kwds:
 */
        __Pyx_INCREF(__pyx_9genexpr10__pyx_v_k);
        __pyx_t_1 = __pyx_9genexpr10__pyx_v_k;
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_days, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1332, __pyx_L10_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L14_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_hours, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1332, __pyx_L10_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L14_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_minutes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1332, __pyx_L10_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L14_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_seconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1332, __pyx_L10_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L14_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_microseconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1332, __pyx_L10_error)
        __pyx_t_4 = __pyx_t_5;
        __pyx_L14_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = (__pyx_t_4 != 0);
        if (__pyx_t_5) {

          /* "pandas/_libs/tslibs/offsets.pyx":1330
 * 
 *             timedelta_kwds = {
 *                 k: v             # <<<<<<<<<<<<<<
 *                 for k, v in kwds.items()
 *                 if k in ["days", "hours", "minutes", "seconds", "microseconds"]
 */
          if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_9genexpr10__pyx_v_k, (PyObject*)__pyx_9genexpr10__pyx_v_v))) __PYX_ERR(0, 1330, __pyx_L10_error)

          /* "pandas/_libs/tslibs/offsets.pyx":1332
 *                 k: v
 *                 for k, v in kwds.items()
 *                 if k in ["days", "hours", "minutes", "seconds", "microseconds"]             # <<<<<<<<<<<<<<
 *             }
 *             if timedelta_kwds:
 */
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_k); __pyx_9genexpr10__pyx_v_k = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_v); __pyx_9genexpr10__pyx_v_v = 0;
      goto __pyx_L19_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_k); __pyx_9genexpr10__pyx_v_k = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_v); __pyx_9genexpr10__pyx_v_v = 0;
      goto __pyx_L1_error;
      __pyx_L19_exit_scope:;
    } /* exit inner scope */
    __pyx_v_timedelta_kwds = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1334
 *                 if k in ["days", "hours", "minutes", "seconds", "microseconds"]
 *             }
 *             if timedelta_kwds:             # <<<<<<<<<<<<<<
 *                 delta = Timedelta(**timedelta_kwds)
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_timedelta_kwds); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1334, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1335
 *             }
 *             if timedelta_kwds:
 *                 delta = Timedelta(**timedelta_kwds)             # <<<<<<<<<<<<<<
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 *                 dt64other = dt64other + (self.n * td)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyDict_Copy(__pyx_v_timedelta_kwds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1336
 *             if timedelta_kwds:
 *                 delta = Timedelta(**timedelta_kwds)
 *                 td = (<_Timedelta>delta)._as_reso(reso)             # <<<<<<<<<<<<<<
 *                 dt64other = dt64other + (self.n * td)
 *             return dt64other
 */
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_v_delta)->__pyx_vtab)->_as_reso(((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_v_delta), __pyx_v_reso, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_td, ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1337
 *                 delta = Timedelta(**timedelta_kwds)
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 *                 dt64other = dt64other + (self.n * td)             # <<<<<<<<<<<<<<
 *             return dt64other
 *         elif not self._use_relativedelta and hasattr(self, "_offset"):
 */
      __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, ((PyObject *)__pyx_v_td)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_v_dt64other, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt64other, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1334
 *                 if k in ["days", "hours", "minutes", "seconds", "microseconds"]
 *             }
 *             if timedelta_kwds:             # <<<<<<<<<<<<<<
 *                 delta = Timedelta(**timedelta_kwds)
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1338
 *                 td = (<_Timedelta>delta)._as_reso(reso)
 *                 dt64other = dt64other + (self.n * td)
 *             return dt64other             # <<<<<<<<<<<<<<
 *         elif not self._use_relativedelta and hasattr(self, "_offset"):
 *             # timedelta
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_dt64other);
    __pyx_r = __pyx_v_dt64other;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1316
 *         }
 *         # relativedelta/_offset path only valid for base DateOffset
 *         if self._use_relativedelta and set(kwds).issubset(relativedelta_fast):             # <<<<<<<<<<<<<<
 * 
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1339
 *                 dt64other = dt64other + (self.n * td)
 *             return dt64other
 *         elif not self._use_relativedelta and hasattr(self, "_offset"):             # <<<<<<<<<<<<<<
 *             # timedelta
 *             num_nano = getattr(self, "nanoseconds", 0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_use_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = ((!__pyx_t_4) != 0);
  if (__pyx_t_11) {
  } else {
    __pyx_t_5 = __pyx_t_11;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_u_offset); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1339, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_11 != 0);
  __pyx_t_5 = __pyx_t_4;
  __pyx_L21_bool_binop_done:;
  if (likely(__pyx_t_5)) {

    /* "pandas/_libs/tslibs/offsets.pyx":1341
 *         elif not self._use_relativedelta and hasattr(self, "_offset"):
 *             # timedelta
 *             num_nano = getattr(self, "nanoseconds", 0)             # <<<<<<<<<<<<<<
 *             if num_nano != 0:
 *                 rem_nano = Timedelta(nanoseconds=num_nano)
 */
    __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_u_nanoseconds, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_num_nano = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1342
 *             # timedelta
 *             num_nano = getattr(self, "nanoseconds", 0)
 *             if num_nano != 0:             # <<<<<<<<<<<<<<
 *                 rem_nano = Timedelta(nanoseconds=num_nano)
 *                 delta = Timedelta((self._offset + rem_nano) * self.n)
 */
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_num_nano, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1343
 *             num_nano = getattr(self, "nanoseconds", 0)
 *             if num_nano != 0:
 *                 rem_nano = Timedelta(nanoseconds=num_nano)             # <<<<<<<<<<<<<<
 *                 delta = Timedelta((self._offset + rem_nano) * self.n)
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_nanoseconds, __pyx_v_num_nano) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_rem_nano = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1344
 *             if num_nano != 0:
 *                 rem_nano = Timedelta(nanoseconds=num_nano)
 *                 delta = Timedelta((self._offset + rem_nano) * self.n)             # <<<<<<<<<<<<<<
 *             else:
 *                 delta = Timedelta(self._offset * self.n)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_rem_nano); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_delta = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1342
 *             # timedelta
 *             num_nano = getattr(self, "nanoseconds", 0)
 *             if num_nano != 0:             # <<<<<<<<<<<<<<
 *                 rem_nano = Timedelta(nanoseconds=num_nano)
 *                 delta = Timedelta((self._offset + rem_nano) * self.n)
 */
      goto __pyx_L23;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1346
 *                 delta = Timedelta((self._offset + rem_nano) * self.n)
 *             else:
 *                 delta = Timedelta(self._offset * self.n)             # <<<<<<<<<<<<<<
 *             td = (<_Timedelta>delta)._as_reso(reso)
 *             return dt64other + td
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_delta = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L23:;

    /* "pandas/_libs/tslibs/offsets.pyx":1347
 *             else:
 *                 delta = Timedelta(self._offset * self.n)
 *             td = (<_Timedelta>delta)._as_reso(reso)             # <<<<<<<<<<<<<<
 *             return dt64other + td
 *         else:
 */
    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_v_delta)->__pyx_vtab)->_as_reso(((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_v_delta), __pyx_v_reso, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_td = ((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1348
 *                 delta = Timedelta(self._offset * self.n)
 *             td = (<_Timedelta>delta)._as_reso(reso)
 *             return dt64other + td             # <<<<<<<<<<<<<<
 *         else:
 *             # relativedelta with other keywords
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyNumber_Add(__pyx_v_dt64other, ((PyObject *)__pyx_v_td)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1339
 *                 dt64other = dt64other + (self.n * td)
 *             return dt64other
 *         elif not self._use_relativedelta and hasattr(self, "_offset"):             # <<<<<<<<<<<<<<
 *             # timedelta
 *             num_nano = getattr(self, "nanoseconds", 0)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1351
 *         else:
 *             # relativedelta with other keywords
 *             kwd = set(kwds) - relativedelta_fast             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 "DateOffset with relativedelta "
 */
  /*else*/ {
    __pyx_t_3 = PySet_New(__pyx_v_kwds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_v_relativedelta_fast); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_kwd = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1353
 *             kwd = set(kwds) - relativedelta_fast
 *             raise NotImplementedError(
 *                 "DateOffset with relativedelta "             # <<<<<<<<<<<<<<
 *                 f"keyword(s) {kwd} not able to be "
 *                 "applied vectorized"
 */
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = 0;
    __pyx_t_13 = 127;
    __Pyx_INCREF(__pyx_kp_u_DateOffset_with_relativedelta_ke);
    __pyx_t_8 += 41;
    __Pyx_GIVEREF(__pyx_kp_u_DateOffset_with_relativedelta_ke);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_DateOffset_with_relativedelta_ke);

    /* "pandas/_libs/tslibs/offsets.pyx":1354
 *             raise NotImplementedError(
 *                 "DateOffset with relativedelta "
 *                 f"keyword(s) {kwd} not able to be "             # <<<<<<<<<<<<<<
 *                 "applied vectorized"
 *             )
 */
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_kwd, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_13;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_not_able_to_be_applied_vectoriz);
    __pyx_t_8 += 34;
    __Pyx_GIVEREF(__pyx_kp_u_not_able_to_be_applied_vectoriz);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_not_able_to_be_applied_vectoriz);

    /* "pandas/_libs/tslibs/offsets.pyx":1353
 *             kwd = set(kwds) - relativedelta_fast
 *             raise NotImplementedError(
 *                 "DateOffset with relativedelta "             # <<<<<<<<<<<<<<
 *                 f"keyword(s) {kwd} not able to be "
 *                 "applied vectorized"
 */
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1352
 *             # relativedelta with other keywords
 *             kwd = set(kwds) - relativedelta_fast
 *             raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                 "DateOffset with relativedelta "
 *                 f"keyword(s) {kwd} not able to be "
 */
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1352, __pyx_L1_error)
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1301
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         dt64other = np.asarray(dtarr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt64other);
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_XDECREF(__pyx_v_relativedelta_fast);
  __Pyx_XDECREF(__pyx_v_months);
  __Pyx_XDECREF(__pyx_v_shifted);
  __Pyx_XDECREF(__pyx_v_weeks);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_td);
  __Pyx_XDECREF(__pyx_v_timedelta_kwds);
  __Pyx_XDECREF(__pyx_v_num_nano);
  __Pyx_XDECREF(__pyx_v_rem_nano);
  __Pyx_XDECREF(__pyx_v_kwd);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_k);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1358
 *             )
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_11is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_11is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 1358, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_10is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_10is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1359
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1360
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1359
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1361
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1358
 *             )
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L0:;
  __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_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_12__reduce_cython__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_12__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__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;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  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._cache, self.n, self.normalize)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.normalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._cache);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._cache);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base._cache);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._cache, self.n, self.normalize)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._cache, self.n, self.normalize)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._cache is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._cache, self.n, self.normalize)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._cache is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->__pyx_base._cache != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._cache is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._cache is not None
 *     if use_setstate:
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_RelativeDeltaOffs); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_10844460);
    __Pyx_GIVEREF(__pyx_int_10844460);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_10844460);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._cache is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, None), state
 *     else:
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RelativeDeltaOffset__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_RelativeDeltaOffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_10844460);
    __Pyx_GIVEREF(__pyx_int_10844460);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_10844460);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 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_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset.__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_RelativeDeltaOffset, (type(self), 0x0a5792c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RelativeDeltaOffset__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_14__setstate_cython__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_14__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RelativeDeltaOffset__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_RelativeDeltaOffset__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RelativeDeltaOffset, (type(self), 0x0a5792c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RelativeDeltaOffset__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.RelativeDeltaOffset.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1371
 * 
 *     @classmethod
 *     def __instancecheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return isinstance(obj, BaseOffset)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_1__instancecheck__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_1__instancecheck__ = {"__instancecheck__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_1__instancecheck__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_1__instancecheck__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__instancecheck__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_obj,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__instancecheck__", 1, 2, 2, 1); __PYX_ERR(0, 1371, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__instancecheck__") < 0)) __PYX_ERR(0, 1371, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__instancecheck__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1371, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.OffsetMeta.__instancecheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta___instancecheck__(__pyx_self, __pyx_v_cls, __pyx_v_obj);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta___instancecheck__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__instancecheck__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1372
 *     @classmethod
 *     def __instancecheck__(cls, obj) -> bool:
 *         return isinstance(obj, BaseOffset)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1371
 * 
 *     @classmethod
 *     def __instancecheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return isinstance(obj, BaseOffset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.OffsetMeta.__instancecheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1375
 * 
 *     @classmethod
 *     def __subclasscheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return issubclass(obj, BaseOffset)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_3__subclasscheck__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_3__subclasscheck__ = {"__subclasscheck__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_3__subclasscheck__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_3__subclasscheck__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__subclasscheck__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_obj,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__subclasscheck__", 1, 2, 2, 1); __PYX_ERR(0, 1375, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__subclasscheck__") < 0)) __PYX_ERR(0, 1375, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__subclasscheck__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1375, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.OffsetMeta.__subclasscheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_2__subclasscheck__(__pyx_self, __pyx_v_cls, __pyx_v_obj);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_2__subclasscheck__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__subclasscheck__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1376
 *     @classmethod
 *     def __subclasscheck__(cls, obj) -> bool:
 *         return issubclass(obj, BaseOffset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_IsSubclass(__pyx_v_obj, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1376, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1375
 * 
 *     @classmethod
 *     def __subclasscheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return issubclass(obj, BaseOffset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.OffsetMeta.__subclasscheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1485
 *     Timestamp('2017-01-01 08:10:11')
 *     """
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         raise AttributeError("DateOffset objects are immutable.")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10DateOffset_1__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10DateOffset_1__setattr__ = {"__setattr__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10DateOffset_1__setattr__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10DateOffset_1__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name_2,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 1485, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 1485, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 1485, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1485, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.DateOffset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10DateOffset___setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10DateOffset___setattr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1486
 *     """
 *     def __setattr__(self, name, value):
 *         raise AttributeError("DateOffset objects are immutable.")             # <<<<<<<<<<<<<<
 * 
 * # --------------------------------------------------------------------
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1486, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1485
 *     Timestamp('2017-01-01 08:10:11')
 *     """
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         raise AttributeError("DateOffset objects are immutable.")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.DateOffset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1501
 *         object weekmask, holidays, calendar
 * 
 *     def __init__(self, n=1, normalize=False, offset=timedelta(0)):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self._offset = offset
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_offset = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_offset_2,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = __pyx_k__34;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1501, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_offset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_offset) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1502
 * 
 *     def __init__(self, n=1, normalize=False, offset=timedelta(0)):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 *         self._offset = offset
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1503
 *     def __init__(self, n=1, normalize=False, offset=timedelta(0)):
 *         BaseOffset.__init__(self, n, normalize)
 *         self._offset = offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef _init_custom(self, weekmask, holidays, calendar):
 */
  if (!(likely(((__pyx_v_offset) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_offset, __pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1503, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_offset;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_offset);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_offset));
  __pyx_v_self->_offset = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1501
 *         object weekmask, holidays, calendar
 * 
 *     def __init__(self, n=1, normalize=False, offset=timedelta(0)):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self._offset = offset
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1505
 *         self._offset = offset
 * 
 *     cpdef _init_custom(self, weekmask, holidays, calendar):             # <<<<<<<<<<<<<<
 *         """
 *         Additional __init__ for Custom subclasses.
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_3_init_custom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin__init_custom(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_custom", 0);
  __Pyx_INCREF(__pyx_v_holidays);
  __Pyx_INCREF(__pyx_v_calendar);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_custom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_3_init_custom)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1505, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_weekmask);
          __Pyx_GIVEREF(__pyx_v_weekmask);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_weekmask);
          __Pyx_INCREF(__pyx_v_holidays);
          __Pyx_GIVEREF(__pyx_v_holidays);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_holidays);
          __Pyx_INCREF(__pyx_v_calendar);
          __Pyx_GIVEREF(__pyx_v_calendar);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_calendar);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1509
 *         Additional __init__ for Custom subclasses.
 *         """
 *         calendar, holidays = _get_calendar(             # <<<<<<<<<<<<<<
 *             weekmask=weekmask, holidays=holidays, calendar=calendar
 *         )
 */
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__get_calendar(__pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    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, 1509, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1509, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1515
 *         # following two attributes. See DateOffset._params()
 *         # holidays, weekmask
 *         self.weekmask = weekmask             # <<<<<<<<<<<<<<
 *         self.holidays = holidays
 *         self.calendar = calendar
 */
  __Pyx_INCREF(__pyx_v_weekmask);
  __Pyx_GIVEREF(__pyx_v_weekmask);
  __Pyx_GOTREF(__pyx_v_self->weekmask);
  __Pyx_DECREF(__pyx_v_self->weekmask);
  __pyx_v_self->weekmask = __pyx_v_weekmask;

  /* "pandas/_libs/tslibs/offsets.pyx":1516
 *         # holidays, weekmask
 *         self.weekmask = weekmask
 *         self.holidays = holidays             # <<<<<<<<<<<<<<
 *         self.calendar = calendar
 * 
 */
  __Pyx_INCREF(__pyx_v_holidays);
  __Pyx_GIVEREF(__pyx_v_holidays);
  __Pyx_GOTREF(__pyx_v_self->holidays);
  __Pyx_DECREF(__pyx_v_self->holidays);
  __pyx_v_self->holidays = __pyx_v_holidays;

  /* "pandas/_libs/tslibs/offsets.pyx":1517
 *         self.weekmask = weekmask
 *         self.holidays = holidays
 *         self.calendar = calendar             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_INCREF(__pyx_v_calendar);
  __Pyx_GIVEREF(__pyx_v_calendar);
  __Pyx_GOTREF(__pyx_v_self->calendar);
  __Pyx_DECREF(__pyx_v_self->calendar);
  __pyx_v_self->calendar = __pyx_v_calendar;

  /* "pandas/_libs/tslibs/offsets.pyx":1505
 *         self._offset = offset
 * 
 *     cpdef _init_custom(self, weekmask, holidays, calendar):             # <<<<<<<<<<<<<<
 *         """
 *         Additional __init__ for Custom subclasses.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin._init_custom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_holidays);
  __Pyx_XDECREF(__pyx_v_calendar);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_3_init_custom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_2_init_custom[] = "\n        Additional __init__ for Custom subclasses.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_3_init_custom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_weekmask = 0;
  PyObject *__pyx_v_holidays = 0;
  PyObject *__pyx_v_calendar = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_custom (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_weekmask,&__pyx_n_s_holidays,&__pyx_n_s_calendar,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekmask)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_holidays)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_custom", 1, 3, 3, 1); __PYX_ERR(0, 1505, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calendar)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_custom", 1, 3, 3, 2); __PYX_ERR(0, 1505, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_custom") < 0)) __PYX_ERR(0, 1505, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_weekmask = values[0];
    __pyx_v_holidays = values[1];
    __pyx_v_calendar = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_init_custom", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1505, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin._init_custom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_2_init_custom(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_2_init_custom(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_custom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin__init_custom(__pyx_v_self, __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin._init_custom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1520
 * 
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for self._offset.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6offset___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6offset___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1525
 *         """
 *         # Alias for backward compat
 *         return self._offset             # <<<<<<<<<<<<<<
 * 
 *     def _repr_attrs(self) -> str:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_offset));
  __pyx_r = ((PyObject *)__pyx_v_self->_offset);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1520
 * 
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for self._offset.
 */

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

/* "pandas/_libs/tslibs/offsets.pyx":1527
 *         return self._offset
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         if self.offset:
 *             attrs = [f"offset={repr(self.offset)}"]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_5_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_5_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_attrs (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_4_repr_attrs(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_4_repr_attrs(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self) {
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr_attrs", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1528
 * 
 *     def _repr_attrs(self) -> str:
 *         if self.offset:             # <<<<<<<<<<<<<<
 *             attrs = [f"offset={repr(self.offset)}"]
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1529
 *     def _repr_attrs(self) -> str:
 *         if self.offset:
 *             attrs = [f"offset={repr(self.offset)}"]             # <<<<<<<<<<<<<<
 *         else:
 *             attrs = []
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offset_3, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_v_attrs = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1528
 * 
 *     def _repr_attrs(self) -> str:
 *         if self.offset:             # <<<<<<<<<<<<<<
 *             attrs = [f"offset={repr(self.offset)}"]
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1531
 *             attrs = [f"offset={repr(self.offset)}"]
 *         else:
 *             attrs = []             # <<<<<<<<<<<<<<
 *         out = ""
 *         if attrs:
 */
  /*else*/ {
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_attrs = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1532
 *         else:
 *             attrs = []
 *         out = ""             # <<<<<<<<<<<<<<
 *         if attrs:
 *             out += ": " + ", ".join(attrs)
 */
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_v_out = __pyx_kp_u__14;

  /* "pandas/_libs/tslibs/offsets.pyx":1533
 *             attrs = []
 *         out = ""
 *         if attrs:             # <<<<<<<<<<<<<<
 *             out += ": " + ", ".join(attrs)
 *         return out
 */
  __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_attrs) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1534
 *         out = ""
 *         if attrs:
 *             out += ": " + ", ".join(attrs)             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
    __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__20, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u__19, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_out, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1533
 *             attrs = []
 *         out = ""
 *         if attrs:             # <<<<<<<<<<<<<<
 *             out += ": " + ", ".join(attrs)
 *         return out
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1535
 *         if attrs:
 *             out += ": " + ", ".join(attrs)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1527
 *         return self._offset
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         if self.offset:
 *             attrs = [f"offset={repr(self.offset)}"]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin._repr_attrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1537
 *         return out
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         # We need to use a cdef/cpdef method to set the readonly _offset attribute
 *         if "_offset" in state:
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_weekmask = NULL;
  PyObject *__pyx_v_holidays = NULL;
  PyObject *__pyx_v_calendar = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1539
 *     cpdef __setstate__(self, state):
 *         # We need to use a cdef/cpdef method to set the readonly _offset attribute
 *         if "_offset" in state:             # <<<<<<<<<<<<<<
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_offset, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":1540
 *         # We need to use a cdef/cpdef method to set the readonly _offset attribute
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")             # <<<<<<<<<<<<<<
 *         elif "offset" in state:
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_offset) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_offset);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_offset);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_offset));
    __pyx_v_self->_offset = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1539
 *     cpdef __setstate__(self, state):
 *         # We need to use a cdef/cpdef method to set the readonly _offset attribute
 *         if "_offset" in state:             # <<<<<<<<<<<<<<
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1541
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:             # <<<<<<<<<<<<<<
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             self._offset = state.pop("offset")
 */
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_offset_2, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":1543
 *         elif "offset" in state:
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             self._offset = state.pop("offset")             # <<<<<<<<<<<<<<
 * 
 *         if self._prefix.startswith("C"):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_offset_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_offset_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_offset);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_offset));
    __pyx_v_self->_offset = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1541
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:             # <<<<<<<<<<<<<<
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             self._offset = state.pop("offset")
 */
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1545
 *             self._offset = state.pop("offset")
 * 
 *         if self._prefix.startswith("C"):             # <<<<<<<<<<<<<<
 *             # i.e. this is a Custom class
 *             weekmask = state.pop("weekmask")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_C) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_C);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":1547
 *         if self._prefix.startswith("C"):
 *             # i.e. this is a Custom class
 *             weekmask = state.pop("weekmask")             # <<<<<<<<<<<<<<
 *             holidays = state.pop("holidays")
 *             calendar, holidays = _get_calendar(weekmask=weekmask,
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_weekmask) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_weekmask);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_weekmask = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1548
 *             # i.e. this is a Custom class
 *             weekmask = state.pop("weekmask")
 *             holidays = state.pop("holidays")             # <<<<<<<<<<<<<<
 *             calendar, holidays = _get_calendar(weekmask=weekmask,
 *                                                holidays=holidays,
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_holidays) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_holidays);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_holidays = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1549
 *             weekmask = state.pop("weekmask")
 *             holidays = state.pop("holidays")
 *             calendar, holidays = _get_calendar(weekmask=weekmask,             # <<<<<<<<<<<<<<
 *                                                holidays=holidays,
 *                                                calendar=None)
 */
    __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__get_calendar(__pyx_v_weekmask, __pyx_v_holidays, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      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, 1549, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1549, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1549, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __pyx_v_calendar = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_holidays, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1552
 *                                                holidays=holidays,
 *                                                calendar=None)
 *             self.weekmask = weekmask             # <<<<<<<<<<<<<<
 *             self.calendar = calendar
 *             self.holidays = holidays
 */
    __Pyx_INCREF(__pyx_v_weekmask);
    __Pyx_GIVEREF(__pyx_v_weekmask);
    __Pyx_GOTREF(__pyx_v_self->weekmask);
    __Pyx_DECREF(__pyx_v_self->weekmask);
    __pyx_v_self->weekmask = __pyx_v_weekmask;

    /* "pandas/_libs/tslibs/offsets.pyx":1553
 *                                                calendar=None)
 *             self.weekmask = weekmask
 *             self.calendar = calendar             # <<<<<<<<<<<<<<
 *             self.holidays = holidays
 * 
 */
    __Pyx_INCREF(__pyx_v_calendar);
    __Pyx_GIVEREF(__pyx_v_calendar);
    __Pyx_GOTREF(__pyx_v_self->calendar);
    __Pyx_DECREF(__pyx_v_self->calendar);
    __pyx_v_self->calendar = __pyx_v_calendar;

    /* "pandas/_libs/tslibs/offsets.pyx":1554
 *             self.weekmask = weekmask
 *             self.calendar = calendar
 *             self.holidays = holidays             # <<<<<<<<<<<<<<
 * 
 *         BaseOffset.__setstate__(self, state)
 */
    __Pyx_INCREF(__pyx_v_holidays);
    __Pyx_GIVEREF(__pyx_v_holidays);
    __Pyx_GOTREF(__pyx_v_self->holidays);
    __Pyx_DECREF(__pyx_v_self->holidays);
    __pyx_v_self->holidays = __pyx_v_holidays;

    /* "pandas/_libs/tslibs/offsets.pyx":1545
 *             self._offset = state.pop("offset")
 * 
 *         if self._prefix.startswith("C"):             # <<<<<<<<<<<<<<
 *             # i.e. this is a Custom class
 *             weekmask = state.pop("weekmask")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1556
 *             self.holidays = holidays
 * 
 *         BaseOffset.__setstate__(self, state)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_setstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_state};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_state};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_state);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1537
 *         return out
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         # We need to use a cdef/cpdef method to set the readonly _offset attribute
 *         if "_offset" in 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_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weekmask);
  __Pyx_XDECREF(__pyx_v_holidays);
  __Pyx_XDECREF(__pyx_v_calendar);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessMixin.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1497
 * 
 *     cdef readonly:
 *         timedelta _offset             # <<<<<<<<<<<<<<
 *         # Only Custom subclasses use weekmask, holiday, calendar
 *         object weekmask, holidays, calendar
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7_offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7_offset___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7_offset___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_offset));
  __pyx_r = ((PyObject *)__pyx_v_self->_offset);
  goto __pyx_L0;

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

/* "pandas/_libs/tslibs/offsets.pyx":1499
 *         timedelta _offset
 *         # Only Custom subclasses use weekmask, holiday, calendar
 *         object weekmask, holidays, calendar             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, offset=timedelta(0)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8weekmask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8weekmask_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8weekmask___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8weekmask___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->weekmask);
  __pyx_r = __pyx_v_self->weekmask;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8holidays_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8holidays_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8holidays___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8holidays___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->holidays);
  __pyx_r = __pyx_v_self->holidays;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8calendar_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8calendar_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8calendar___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8calendar___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->calendar);
  __pyx_r = __pyx_v_self->calendar;
  goto __pyx_L0;

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

/* "pandas/_libs/tslibs/offsets.pyx":1573
 *     _attributes = tuple(["n", "normalize", "offset"])
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_1__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_1__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1573, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1574
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         if "_offset" in state:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":1575
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":1576
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         if "_offset" in state:             # <<<<<<<<<<<<<<
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:
 */
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_offset, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1576, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":1577
 *         self.normalize = state.pop("normalize")
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")             # <<<<<<<<<<<<<<
 *         elif "offset" in state:
 *             self._offset = state.pop("offset")
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_offset) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_offset);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1577, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base._offset);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base._offset));
    __pyx_v_self->__pyx_base._offset = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1576
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         if "_offset" in state:             # <<<<<<<<<<<<<<
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1578
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:             # <<<<<<<<<<<<<<
 *             self._offset = state.pop("offset")
 *         self._cache = state.pop("_cache", {})
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_offset_2, __pyx_v_state, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_7 != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":1579
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:
 *             self._offset = state.pop("offset")             # <<<<<<<<<<<<<<
 *         self._cache = state.pop("_cache", {})
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_offset_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_offset_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base._offset);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base._offset));
    __pyx_v_self->__pyx_base._offset = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1578
 *         if "_offset" in state:
 *             self._offset = state.pop("_offset")
 *         elif "offset" in state:             # <<<<<<<<<<<<<<
 *             self._offset = state.pop("offset")
 *         self._cache = state.pop("_cache", {})
 */
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1580
 *         elif "offset" in state:
 *             self._offset = state.pop("offset")
 *         self._cache = state.pop("_cache", {})             # <<<<<<<<<<<<<<
 * 
 *     def _offset_str(self) -> str:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_cache, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_cache, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_n_u_cache);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._cache);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._cache);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1573
 *     _attributes = tuple(["n", "normalize", "offset"])
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_1__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_1__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1582
 *         self._cache = state.pop("_cache", {})
 * 
 *     def _offset_str(self) -> str:             # <<<<<<<<<<<<<<
 *         def get_str(td):
 *             off_str = ""
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_3_offset_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_3_offset_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_offset_str (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_2_offset_str(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_v_self));

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

/* "pandas/_libs/tslibs/offsets.pyx":1583
 * 
 *     def _offset_str(self) -> str:
 *         def get_str(td):             # <<<<<<<<<<<<<<
 *             off_str = ""
 *             if td.days > 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_1get_str(PyObject *__pyx_self, PyObject *__pyx_v_td); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_1get_str = {"get_str", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_1get_str, METH_O, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_1get_str(PyObject *__pyx_self, PyObject *__pyx_v_td) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_str (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_get_str(__pyx_self, ((PyObject *)__pyx_v_td));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_get_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td) {
  PyObject *__pyx_v_off_str = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_hrs = NULL;
  PyObject *__pyx_v_mts = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_str", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1584
 *     def _offset_str(self) -> str:
 *         def get_str(td):
 *             off_str = ""             # <<<<<<<<<<<<<<
 *             if td.days > 0:
 *                 off_str += str(td.days) + "D"
 */
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_v_off_str = __pyx_kp_u__14;

  /* "pandas/_libs/tslibs/offsets.pyx":1585
 *         def get_str(td):
 *             off_str = ""
 *             if td.days > 0:             # <<<<<<<<<<<<<<
 *                 off_str += str(td.days) + "D"
 *             if td.seconds > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":1586
 *             off_str = ""
 *             if td.days > 0:
 *                 off_str += str(td.days) + "D"             # <<<<<<<<<<<<<<
 *             if td.seconds > 0:
 *                 s = td.seconds
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_off_str, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_off_str, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1585
 *         def get_str(td):
 *             off_str = ""
 *             if td.days > 0:             # <<<<<<<<<<<<<<
 *                 off_str += str(td.days) + "D"
 *             if td.seconds > 0:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1587
 *             if td.days > 0:
 *                 off_str += str(td.days) + "D"
 *             if td.seconds > 0:             # <<<<<<<<<<<<<<
 *                 s = td.seconds
 *                 hrs = int(s / 3600)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":1588
 *                 off_str += str(td.days) + "D"
 *             if td.seconds > 0:
 *                 s = td.seconds             # <<<<<<<<<<<<<<
 *                 hrs = int(s / 3600)
 *                 if hrs != 0:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1589
 *             if td.seconds > 0:
 *                 s = td.seconds
 *                 hrs = int(s / 3600)             # <<<<<<<<<<<<<<
 *                 if hrs != 0:
 *                     off_str += str(hrs) + "H"
 */
    __pyx_t_2 = __Pyx_PyInt_TrueDivideObjC(__pyx_v_s, __pyx_int_3600, 0xE10, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_hrs = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1590
 *                 s = td.seconds
 *                 hrs = int(s / 3600)
 *                 if hrs != 0:             # <<<<<<<<<<<<<<
 *                     off_str += str(hrs) + "H"
 *                     s -= hrs * 3600
 */
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_hrs, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1590, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "pandas/_libs/tslibs/offsets.pyx":1591
 *                 hrs = int(s / 3600)
 *                 if hrs != 0:
 *                     off_str += str(hrs) + "H"             # <<<<<<<<<<<<<<
 *                     s -= hrs * 3600
 *                 mts = int(s / 60)
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_hrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_H); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_off_str, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_off_str, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1592
 *                 if hrs != 0:
 *                     off_str += str(hrs) + "H"
 *                     s -= hrs * 3600             # <<<<<<<<<<<<<<
 *                 mts = int(s / 60)
 *                 if mts != 0:
 */
      __pyx_t_1 = PyNumber_Multiply(__pyx_v_hrs, __pyx_int_3600); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1590
 *                 s = td.seconds
 *                 hrs = int(s / 3600)
 *                 if hrs != 0:             # <<<<<<<<<<<<<<
 *                     off_str += str(hrs) + "H"
 *                     s -= hrs * 3600
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1593
 *                     off_str += str(hrs) + "H"
 *                     s -= hrs * 3600
 *                 mts = int(s / 60)             # <<<<<<<<<<<<<<
 *                 if mts != 0:
 *                     off_str += str(mts) + "Min"
 */
    __pyx_t_2 = __Pyx_PyInt_TrueDivideObjC(__pyx_v_s, __pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_mts = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1594
 *                     s -= hrs * 3600
 *                 mts = int(s / 60)
 *                 if mts != 0:             # <<<<<<<<<<<<<<
 *                     off_str += str(mts) + "Min"
 *                     s -= mts * 60
 */
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_mts, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "pandas/_libs/tslibs/offsets.pyx":1595
 *                 mts = int(s / 60)
 *                 if mts != 0:
 *                     off_str += str(mts) + "Min"             # <<<<<<<<<<<<<<
 *                     s -= mts * 60
 *                 if s != 0:
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_mts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_Min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_off_str, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_off_str, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1596
 *                 if mts != 0:
 *                     off_str += str(mts) + "Min"
 *                     s -= mts * 60             # <<<<<<<<<<<<<<
 *                 if s != 0:
 *                     off_str += str(s) + "s"
 */
      __pyx_t_1 = PyNumber_Multiply(__pyx_v_mts, __pyx_int_60); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1594
 *                     s -= hrs * 3600
 *                 mts = int(s / 60)
 *                 if mts != 0:             # <<<<<<<<<<<<<<
 *                     off_str += str(mts) + "Min"
 *                     s -= mts * 60
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1597
 *                     off_str += str(mts) + "Min"
 *                     s -= mts * 60
 *                 if s != 0:             # <<<<<<<<<<<<<<
 *                     off_str += str(s) + "s"
 *             if td.microseconds > 0:
 */
    __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_v_s, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "pandas/_libs/tslibs/offsets.pyx":1598
 *                     s -= mts * 60
 *                 if s != 0:
 *                     off_str += str(s) + "s"             # <<<<<<<<<<<<<<
 *             if td.microseconds > 0:
 *                 off_str += str(td.microseconds) + "us"
 */
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_n_u_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off_str, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_off_str, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1597
 *                     off_str += str(mts) + "Min"
 *                     s -= mts * 60
 *                 if s != 0:             # <<<<<<<<<<<<<<
 *                     off_str += str(s) + "s"
 *             if td.microseconds > 0:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1587
 *             if td.days > 0:
 *                 off_str += str(td.days) + "D"
 *             if td.seconds > 0:             # <<<<<<<<<<<<<<
 *                 s = td.seconds
 *                 hrs = int(s / 3600)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1599
 *                 if s != 0:
 *                     off_str += str(s) + "s"
 *             if td.microseconds > 0:             # <<<<<<<<<<<<<<
 *                 off_str += str(td.microseconds) + "us"
 *             return off_str
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __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, 1599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":1600
 *                     off_str += str(s) + "s"
 *             if td.microseconds > 0:
 *                 off_str += str(td.microseconds) + "us"             # <<<<<<<<<<<<<<
 *             return off_str
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_n_u_us); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off_str, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_off_str, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1599
 *                 if s != 0:
 *                     off_str += str(s) + "s"
 *             if td.microseconds > 0:             # <<<<<<<<<<<<<<
 *                 off_str += str(td.microseconds) + "us"
 *             return off_str
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1601
 *             if td.microseconds > 0:
 *                 off_str += str(td.microseconds) + "us"
 *             return off_str             # <<<<<<<<<<<<<<
 * 
 *         if PyDelta_Check(self.offset):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_off_str);
  __pyx_r = __pyx_v_off_str;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1583
 * 
 *     def _offset_str(self) -> str:
 *         def get_str(td):             # <<<<<<<<<<<<<<
 *             off_str = ""
 *             if td.days > 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay._offset_str.get_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_off_str);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_hrs);
  __Pyx_XDECREF(__pyx_v_mts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1582
 *         self._cache = state.pop("_cache", {})
 * 
 *     def _offset_str(self) -> str:             # <<<<<<<<<<<<<<
 *         def get_str(td):
 *             off_str = ""
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_2_offset_str(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self) {
  PyObject *__pyx_v_get_str = 0;
  PyDateTime_Delta *__pyx_v_zero = NULL;
  PyObject *__pyx_v_off_str = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_offset_str", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1583
 * 
 *     def _offset_str(self) -> str:
 *         def get_str(td):             # <<<<<<<<<<<<<<
 *             off_str = ""
 *             if td.days > 0:
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_1get_str, 0, __pyx_n_s_offset_str_locals_get_str, NULL, __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_get_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1603
 *             return off_str
 * 
 *         if PyDelta_Check(self.offset):             # <<<<<<<<<<<<<<
 *             zero = timedelta(0, 0, 0)
 *             if self.offset >= zero:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (PyDelta_Check(__pyx_t_1) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":1604
 * 
 *         if PyDelta_Check(self.offset):
 *             zero = timedelta(0, 0, 0)             # <<<<<<<<<<<<<<
 *             if self.offset >= zero:
 *                 off_str = "+" + get_str(self.offset)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_zero = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1605
 *         if PyDelta_Check(self.offset):
 *             zero = timedelta(0, 0, 0)
 *             if self.offset >= zero:             # <<<<<<<<<<<<<<
 *                 off_str = "+" + get_str(self.offset)
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_v_zero), Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1605, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1605, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/_libs/tslibs/offsets.pyx":1606
 *             zero = timedelta(0, 0, 0)
 *             if self.offset >= zero:
 *                 off_str = "+" + get_str(self.offset)             # <<<<<<<<<<<<<<
 *             else:
 *                 off_str = "-" + get_str(-self.offset)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_get_str(__pyx_v_get_str, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_kp_u__38, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_off_str = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1605
 *         if PyDelta_Check(self.offset):
 *             zero = timedelta(0, 0, 0)
 *             if self.offset >= zero:             # <<<<<<<<<<<<<<
 *                 off_str = "+" + get_str(self.offset)
 *             else:
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1608
 *                 off_str = "+" + get_str(self.offset)
 *             else:
 *                 off_str = "-" + get_str(-self.offset)             # <<<<<<<<<<<<<<
 *             return off_str
 *         else:
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_11_offset_str_get_str(__pyx_v_get_str, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_kp_u__39, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_off_str = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "pandas/_libs/tslibs/offsets.pyx":1609
 *             else:
 *                 off_str = "-" + get_str(-self.offset)
 *             return off_str             # <<<<<<<<<<<<<<
 *         else:
 *             return "+" + repr(self.offset)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyUnicode_CheckExact(__pyx_v_off_str))||((__pyx_v_off_str) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_off_str)->tp_name), 0))) __PYX_ERR(0, 1609, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_off_str);
    __pyx_r = ((PyObject*)__pyx_v_off_str);
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1603
 *             return off_str
 * 
 *         if PyDelta_Check(self.offset):             # <<<<<<<<<<<<<<
 *             zero = timedelta(0, 0, 0)
 *             if self.offset >= zero:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1611
 *             return off_str
 *         else:
 *             return "+" + repr(self.offset)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_kp_u__38, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1611, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1582
 *         self._cache = state.pop("_cache", {})
 * 
 *     def _offset_str(self) -> str:             # <<<<<<<<<<<<<<
 *         def get_str(td):
 *             off_str = ""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay._offset_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_get_str);
  __Pyx_XDECREF((PyObject *)__pyx_v_zero);
  __Pyx_XDECREF(__pyx_v_off_str);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1614
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if PyDateTime_Check(other):
 *             n = self.n
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_5_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_5_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_4_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_4_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_wday = NULL;
  PyObject *__pyx_v_weeks = NULL;
  PyObject *__pyx_v_days = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1615
 *     @apply_wraps
 *     def _apply(self, other):
 *         if PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             n = self.n
 *             wday = other.weekday()
 */
  __pyx_t_1 = (PyDateTime_Check(__pyx_v_other) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1616
 *     def _apply(self, other):
 *         if PyDateTime_Check(other):
 *             n = self.n             # <<<<<<<<<<<<<<
 *             wday = other.weekday()
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_n = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1617
 *         if PyDateTime_Check(other):
 *             n = self.n
 *             wday = other.weekday()             # <<<<<<<<<<<<<<
 * 
 *             # avoid slowness below by operating on weeks first
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_weekday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_wday = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1620
 * 
 *             # avoid slowness below by operating on weeks first
 *             weeks = n // 5             # <<<<<<<<<<<<<<
 *             if n <= 0 and wday > 4:
 *                 # roll forward
 */
    __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_n, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_weeks = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1621
 *             # avoid slowness below by operating on weeks first
 *             weeks = n // 5
 *             if n <= 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 n += 1
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {
    } else {
      __pyx_t_1 = __pyx_t_5;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_wday, __pyx_int_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1623
 *             if n <= 0 and wday > 4:
 *                 # roll forward
 *                 n += 1             # <<<<<<<<<<<<<<
 * 
 *             n -= 5 * weeks
 */
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1621
 *             # avoid slowness below by operating on weeks first
 *             weeks = n // 5
 *             if n <= 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 n += 1
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1625
 *                 n += 1
 * 
 *             n -= 5 * weeks             # <<<<<<<<<<<<<<
 * 
 *             # n is always >= 0 at this point
 */
    __pyx_t_2 = PyNumber_Multiply(__pyx_int_5, __pyx_v_weeks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_v_n, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1628
 * 
 *             # n is always >= 0 at this point
 *             if n == 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll back
 *                 days = 4 - wday
 */
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_n, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1628, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {
    } else {
      __pyx_t_1 = __pyx_t_5;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_wday, __pyx_int_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1628, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1628, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1630
 *             if n == 0 and wday > 4:
 *                 # roll back
 *                 days = 4 - wday             # <<<<<<<<<<<<<<
 *             elif wday > 4:
 *                 # roll forward
 */
      __pyx_t_3 = __Pyx_PyInt_SubtractCObj(__pyx_int_4, __pyx_v_wday, 4, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_days = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1628
 * 
 *             # n is always >= 0 at this point
 *             if n == 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll back
 *                 days = 4 - wday
 */
      goto __pyx_L7;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1631
 *                 # roll back
 *                 days = 4 - wday
 *             elif wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 days = (7 - wday) + (n - 1)
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_wday, __pyx_int_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1633
 *             elif wday > 4:
 *                 # roll forward
 *                 days = (7 - wday) + (n - 1)             # <<<<<<<<<<<<<<
 *             elif wday + n <= 4:
 *                 # shift by n days without leaving the current week
 */
      __pyx_t_3 = __Pyx_PyInt_SubtractCObj(__pyx_int_7, __pyx_v_wday, 7, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_days = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1631
 *                 # roll back
 *                 days = 4 - wday
 *             elif wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 days = (7 - wday) + (n - 1)
 */
      goto __pyx_L7;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1634
 *                 # roll forward
 *                 days = (7 - wday) + (n - 1)
 *             elif wday + n <= 4:             # <<<<<<<<<<<<<<
 *                 # shift by n days without leaving the current week
 *                 days = n
 */
    __pyx_t_4 = PyNumber_Add(__pyx_v_wday, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_int_4, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1636
 *             elif wday + n <= 4:
 *                 # shift by n days without leaving the current week
 *                 days = n             # <<<<<<<<<<<<<<
 *             else:
 *                 # shift by n days plus 2 to get past the weekend
 */
      __Pyx_INCREF(__pyx_v_n);
      __pyx_v_days = __pyx_v_n;

      /* "pandas/_libs/tslibs/offsets.pyx":1634
 *                 # roll forward
 *                 days = (7 - wday) + (n - 1)
 *             elif wday + n <= 4:             # <<<<<<<<<<<<<<
 *                 # shift by n days without leaving the current week
 *                 days = n
 */
      goto __pyx_L7;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1639
 *             else:
 *                 # shift by n days plus 2 to get past the weekend
 *                 days = n + 2             # <<<<<<<<<<<<<<
 * 
 *             result = other + timedelta(days=7 * weeks + days)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_days = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L7:;

    /* "pandas/_libs/tslibs/offsets.pyx":1641
 *                 days = n + 2
 * 
 *             result = other + timedelta(days=7 * weeks + days)             # <<<<<<<<<<<<<<
 *             if self.offset:
 *                 result = result + self.offset
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyNumber_Multiply(__pyx_int_7, __pyx_v_weeks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_v_days); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_days, __pyx_t_3) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_v_other, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1642
 * 
 *             result = other + timedelta(days=7 * weeks + days)
 *             if self.offset:             # <<<<<<<<<<<<<<
 *                 result = result + self.offset
 *             return result
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1642, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":1643
 *             result = other + timedelta(days=7 * weeks + days)
 *             if self.offset:
 *                 result = result + self.offset             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Add(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1642
 * 
 *             result = other + timedelta(days=7 * weeks + days)
 *             if self.offset:             # <<<<<<<<<<<<<<
 *                 result = result + self.offset
 *             return result
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1644
 *             if self.offset:
 *                 result = result + self.offset
 *             return result             # <<<<<<<<<<<<<<
 * 
 *         elif is_any_td_scalar(other):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1615
 *     @apply_wraps
 *     def _apply(self, other):
 *         if PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             n = self.n
 *             wday = other.weekday()
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1646
 *             return result
 * 
 *         elif is_any_td_scalar(other):             # <<<<<<<<<<<<<<
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_10timedeltas_is_any_td_scalar(__pyx_v_other) != 0);
  if (likely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":1647
 * 
 *         elif is_any_td_scalar(other):
 *             td = Timedelta(self.offset) + other             # <<<<<<<<<<<<<<
 *             return BusinessDay(
 *                 self.n, offset=td.to_pytimedelta(), normalize=self.normalize
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_td = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1648
 *         elif is_any_td_scalar(other):
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(             # <<<<<<<<<<<<<<
 *                 self.n, offset=td.to_pytimedelta(), normalize=self.normalize
 *             )
 */
    __Pyx_XDECREF(__pyx_r);

    /* "pandas/_libs/tslibs/offsets.pyx":1649
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(
 *                 self.n, offset=td.to_pytimedelta(), normalize=self.normalize             # <<<<<<<<<<<<<<
 *             )
 *         else:
 */
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "pandas/_libs/tslibs/offsets.pyx":1648
 *         elif is_any_td_scalar(other):
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(             # <<<<<<<<<<<<<<
 *                 self.n, offset=td.to_pytimedelta(), normalize=self.normalize
 *             )
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1649
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(
 *                 self.n, offset=td.to_pytimedelta(), normalize=self.normalize             # <<<<<<<<<<<<<<
 *             )
 *         else:
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_to_pytimedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_offset_2, __pyx_t_4) < 0) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalize, __pyx_t_4) < 0) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1648
 *         elif is_any_td_scalar(other):
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(             # <<<<<<<<<<<<<<
 *                 self.n, offset=td.to_pytimedelta(), normalize=self.normalize
 *             )
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1646
 *             return result
 * 
 *         elif is_any_td_scalar(other):             # <<<<<<<<<<<<<<
 *             td = Timedelta(self.offset) + other
 *             return BusinessDay(
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1652
 *             )
 *         else:
 *             raise ApplyTypeError(             # <<<<<<<<<<<<<<
 *                 "Only know how to combine business day with datetime or timedelta."
 *             )
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ApplyTypeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Only_know_how_to_combine_busines) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Only_know_how_to_combine_busines);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1652, __pyx_L1_error)
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1614
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if PyDateTime_Check(other):
 *             n = self.n
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_wday);
  __Pyx_XDECREF(__pyx_v_weeks);
  __Pyx_XDECREF(__pyx_v_days);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1657
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         i8other = dtarr.view("i8")
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_7_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_7_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_6_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_6_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_v_i8other = NULL;
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets__shift_bdays __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1658
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         i8other = dtarr.view("i8")             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         res = _shift_bdays(i8other, self.n, reso=reso)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_i8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_i8other = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1659
 *     def _apply_array(self, dtarr):
 *         i8other = dtarr.view("i8")
 *         reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *         res = _shift_bdays(i8other, self.n, reso=reso)
 *         if self.offset:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 1659, __pyx_L1_error)
  __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1660
 *         i8other = dtarr.view("i8")
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         res = _shift_bdays(i8other, self.n, reso=reso)             # <<<<<<<<<<<<<<
 *         if self.offset:
 *             res = res.view(dtarr.dtype) + Timedelta(self.offset)
 */
  if (!(likely(((__pyx_v_i8other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_i8other, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1660, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.reso = __pyx_v_reso;
  __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_bdays(((PyArrayObject *)__pyx_v_i8other), __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1661
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         res = _shift_bdays(i8other, self.n, reso=reso)
 *         if self.offset:             # <<<<<<<<<<<<<<
 *             res = res.view(dtarr.dtype) + Timedelta(self.offset)
 *             res = res.view("i8")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":1662
 *         res = _shift_bdays(i8other, self.n, reso=reso)
 *         if self.offset:
 *             res = res.view(dtarr.dtype) + Timedelta(self.offset)             # <<<<<<<<<<<<<<
 *             res = res.view("i8")
 *         return res
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1663
 *         if self.offset:
 *             res = res.view(dtarr.dtype) + Timedelta(self.offset)
 *             res = res.view("i8")             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_i8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1661
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         res = _shift_bdays(i8other, self.n, reso=reso)
 *         if self.offset:             # <<<<<<<<<<<<<<
 *             res = res.view(dtarr.dtype) + Timedelta(self.offset)
 *             res = res.view("i8")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1664
 *             res = res.view(dtarr.dtype) + Timedelta(self.offset)
 *             res = res.view("i8")
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1657
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         i8other = dtarr.view("i8")
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i8other);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1666
 *         return res
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_9is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_9is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 1666, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_8is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_8is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1667
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.weekday() < 5
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1668
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return dt.weekday() < 5
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1667
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.weekday() < 5
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1669
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return dt.weekday() < 5             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_weekday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_5, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1666
 *         return res
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessDay.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1704
 *         tuple start, end
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *             self, n=1, normalize=False, start="09:00", end="17:00", offset=timedelta(0)
 *     ):
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_v_offset = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_offset_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);

    /* "pandas/_libs/tslibs/offsets.pyx":1705
 * 
 *     def __init__(
 *             self, n=1, normalize=False, start="09:00", end="17:00", offset=timedelta(0)             # <<<<<<<<<<<<<<
 *     ):
 *         BusinessMixin.__init__(self, n, normalize, offset)
 */
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_kp_u_09_00);
    values[3] = ((PyObject *)__pyx_kp_u_17_00);
    values[4] = __pyx_k__40;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1704, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_start = values[2];
    __pyx_v_end = values[3];
    __pyx_v_offset = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1704, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_start, __pyx_v_end, __pyx_v_offset);

  /* "pandas/_libs/tslibs/offsets.pyx":1704
 *         tuple start, end
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *             self, n=1, normalize=False, start="09:00", end="17:00", offset=timedelta(0)
 *     ):
 */

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_offset) {
  PyObject *__pyx_v_num_openings = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_total_secs = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr12__pyx_v_x = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_start);
  __Pyx_INCREF(__pyx_v_end);

  /* "pandas/_libs/tslibs/offsets.pyx":1707
 *             self, n=1, normalize=False, start="09:00", end="17:00", offset=timedelta(0)
 *     ):
 *         BusinessMixin.__init__(self, n, normalize, offset)             # <<<<<<<<<<<<<<
 * 
 *         # must be validated here to equality check
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_offset);
    __Pyx_GIVEREF(__pyx_v_offset);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_offset);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1710
 * 
 *         # must be validated here to equality check
 *         if np.ndim(start) == 0:             # <<<<<<<<<<<<<<
 *             # i.e. not is_list_like
 *             start = [start]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_start) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_start);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":1712
 *         if np.ndim(start) == 0:
 *             # i.e. not is_list_like
 *             start = [start]             # <<<<<<<<<<<<<<
 *         if not len(start):
 *             raise ValueError("Must include at least 1 start time")
 */
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_start);
    __Pyx_GIVEREF(__pyx_v_start);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_start);
    __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1710
 * 
 *         # must be validated here to equality check
 *         if np.ndim(start) == 0:             # <<<<<<<<<<<<<<
 *             # i.e. not is_list_like
 *             start = [start]
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1713
 *             # i.e. not is_list_like
 *             start = [start]
 *         if not len(start):             # <<<<<<<<<<<<<<
 *             raise ValueError("Must include at least 1 start time")
 * 
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1713, __pyx_L1_error)
  __pyx_t_6 = ((!(__pyx_t_7 != 0)) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":1714
 *             start = [start]
 *         if not len(start):
 *             raise ValueError("Must include at least 1 start time")             # <<<<<<<<<<<<<<
 * 
 *         if np.ndim(end) == 0:
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 1714, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1713
 *             # i.e. not is_list_like
 *             start = [start]
 *         if not len(start):             # <<<<<<<<<<<<<<
 *             raise ValueError("Must include at least 1 start time")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1716
 *             raise ValueError("Must include at least 1 start time")
 * 
 *         if np.ndim(end) == 0:             # <<<<<<<<<<<<<<
 *             # i.e. not is_list_like
 *             end = [end]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_end) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_end);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":1718
 *         if np.ndim(end) == 0:
 *             # i.e. not is_list_like
 *             end = [end]             # <<<<<<<<<<<<<<
 *         if not len(end):
 *             raise ValueError("Must include at least 1 end time")
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_end);
    __Pyx_GIVEREF(__pyx_v_end);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_end);
    __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1716
 *             raise ValueError("Must include at least 1 start time")
 * 
 *         if np.ndim(end) == 0:             # <<<<<<<<<<<<<<
 *             # i.e. not is_list_like
 *             end = [end]
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1719
 *             # i.e. not is_list_like
 *             end = [end]
 *         if not len(end):             # <<<<<<<<<<<<<<
 *             raise ValueError("Must include at least 1 end time")
 * 
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_end); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1719, __pyx_L1_error)
  __pyx_t_6 = ((!(__pyx_t_7 != 0)) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":1720
 *             end = [end]
 *         if not len(end):
 *             raise ValueError("Must include at least 1 end time")             # <<<<<<<<<<<<<<
 * 
 *         start = np.array([_validate_business_time(x) for x in start])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1720, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1719
 *             # i.e. not is_list_like
 *             end = [end]
 *         if not len(end):             # <<<<<<<<<<<<<<
 *             raise ValueError("Must include at least 1 end time")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1722
 *             raise ValueError("Must include at least 1 end time")
 * 
 *         start = np.array([_validate_business_time(x) for x in start])             # <<<<<<<<<<<<<<
 *         end = np.array([_validate_business_time(x) for x in end])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1722, __pyx_L9_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_v_start)) || PyTuple_CheckExact(__pyx_v_start)) {
      __pyx_t_3 = __pyx_v_start; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1722, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1722, __pyx_L9_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1722, __pyx_L9_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1722, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1722, __pyx_L9_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1722, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1722, __pyx_L9_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__validate_business_time(__pyx_9genexpr11__pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1722, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1722, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
  __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(0, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1723
 * 
 *         start = np.array([_validate_business_time(x) for x in start])
 *         end = np.array([_validate_business_time(x) for x in end])             # <<<<<<<<<<<<<<
 * 
 *         # Validation of input
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_end)) || PyTuple_CheckExact(__pyx_v_end)) {
      __pyx_t_3 = __pyx_v_end; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1723, __pyx_L15_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1723, __pyx_L15_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1723, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1723, __pyx_L15_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1723, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1723, __pyx_L15_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__validate_business_time(__pyx_9genexpr12__pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1723, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1723, __pyx_L15_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_x); __pyx_9genexpr12__pyx_v_x = 0;
    goto __pyx_L18_exit_scope;
    __pyx_L15_error:;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_x); __pyx_9genexpr12__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L18_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1726
 * 
 *         # Validation of input
 *         if len(start) != len(end):             # <<<<<<<<<<<<<<
 *             raise ValueError("number of starting time and ending time must be the same")
 *         num_openings = len(start)
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1726, __pyx_L1_error)
  __pyx_t_10 = PyObject_Length(__pyx_v_end); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1726, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_7 != __pyx_t_10) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":1727
 *         # Validation of input
 *         if len(start) != len(end):
 *             raise ValueError("number of starting time and ending time must be the same")             # <<<<<<<<<<<<<<
 *         num_openings = len(start)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1727, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1726
 * 
 *         # Validation of input
 *         if len(start) != len(end):             # <<<<<<<<<<<<<<
 *             raise ValueError("number of starting time and ending time must be the same")
 *         num_openings = len(start)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1728
 *         if len(start) != len(end):
 *             raise ValueError("number of starting time and ending time must be the same")
 *         num_openings = len(start)             # <<<<<<<<<<<<<<
 * 
 *         # sort starting and ending time by starting time
 */
  __pyx_t_10 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1728, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_num_openings = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1731
 * 
 *         # sort starting and ending time by starting time
 *         index = np.argsort(start)             # <<<<<<<<<<<<<<
 * 
 *         # convert to tuple so that start and end are hashable
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_start) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_start);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_index = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1734
 * 
 *         # convert to tuple so that start and end are hashable
 *         start = tuple(start[index])             # <<<<<<<<<<<<<<
 *         end = tuple(end[index])
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_start, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1735
 *         # convert to tuple so that start and end are hashable
 *         start = tuple(start[index])
 *         end = tuple(end[index])             # <<<<<<<<<<<<<<
 * 
 *         total_secs = 0
 */
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_end, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1737
 *         end = tuple(end[index])
 * 
 *         total_secs = 0             # <<<<<<<<<<<<<<
 *         for i in range(num_openings):
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_total_secs = __pyx_int_0;

  /* "pandas/_libs/tslibs/offsets.pyx":1738
 * 
 *         total_secs = 0
 *         for i in range(num_openings):             # <<<<<<<<<<<<<<
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])
 *             total_secs += self._get_business_hours_by_sec(
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_num_openings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1738, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1738, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1738, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1738, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1739
 *         total_secs = 0
 *         for i in range(num_openings):
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])             # <<<<<<<<<<<<<<
 *             total_secs += self._get_business_hours_by_sec(
 *                 end[i], start[(i + 1) % num_openings]
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_business_hours_by_sec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_start, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_end, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_11) {
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_4, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_4, __pyx_t_9);
      __pyx_t_3 = 0;
      __pyx_t_9 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_total_secs, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_total_secs, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1740
 *         for i in range(num_openings):
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])
 *             total_secs += self._get_business_hours_by_sec(             # <<<<<<<<<<<<<<
 *                 end[i], start[(i + 1) % num_openings]
 *             )
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_business_hours_by_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "pandas/_libs/tslibs/offsets.pyx":1741
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])
 *             total_secs += self._get_business_hours_by_sec(
 *                 end[i], start[(i + 1) % num_openings]             # <<<<<<<<<<<<<<
 *             )
 *         if total_secs != 24 * 60 * 60:
 */
    __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_end, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = PyNumber_Remainder(__pyx_t_9, __pyx_v_num_openings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_start, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_12, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_12, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_4, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_4, __pyx_t_9);
      __pyx_t_12 = 0;
      __pyx_t_9 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1740
 *         for i in range(num_openings):
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])
 *             total_secs += self._get_business_hours_by_sec(             # <<<<<<<<<<<<<<
 *                 end[i], start[(i + 1) % num_openings]
 *             )
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_total_secs, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_total_secs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1738
 * 
 *         total_secs = 0
 *         for i in range(num_openings):             # <<<<<<<<<<<<<<
 *             total_secs += self._get_business_hours_by_sec(start[i], end[i])
 *             total_secs += self._get_business_hours_by_sec(
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1743
 *                 end[i], start[(i + 1) % num_openings]
 *             )
 *         if total_secs != 24 * 60 * 60:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "invalid starting and ending time(s): "
 */
  __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_total_secs, __pyx_int_86400, 0x15180, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":1744
 *             )
 *         if total_secs != 24 * 60 * 60:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "invalid starting and ending time(s): "
 *                 "opening hours should not touch or overlap with "
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1744, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1743
 *                 end[i], start[(i + 1) % num_openings]
 *             )
 *         if total_secs != 24 * 60 * 60:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "invalid starting and ending time(s): "
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1750
 *             )
 * 
 *         self.start = start             # <<<<<<<<<<<<<<
 *         self.end = end
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_start))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_start)->tp_name), 0))) __PYX_ERR(0, 1750, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_start;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->start);
  __Pyx_DECREF(__pyx_v_self->start);
  __pyx_v_self->start = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1751
 * 
 *         self.start = start
 *         self.end = end             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_end))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_end)->tp_name), 0))) __PYX_ERR(0, 1751, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_end;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->end);
  __Pyx_DECREF(__pyx_v_self->end);
  __pyx_v_self->end = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1704
 *         tuple start, end
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *             self, n=1, normalize=False, start="09:00", end="17:00", offset=timedelta(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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_num_openings);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_total_secs);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1753
 *         self.end = end
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         start = state.pop("start")
 *         start = (start,) if np.ndim(start) == 0 else tuple(start)
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1753, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1754
 * 
 *     cpdef __setstate__(self, state):
 *         start = state.pop("start")             # <<<<<<<<<<<<<<
 *         start = (start,) if np.ndim(start) == 0 else tuple(start)
 *         end = state.pop("end")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_start) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_start);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1755
 *     cpdef __setstate__(self, state):
 *         start = state.pop("start")
 *         start = (start,) if np.ndim(start) == 0 else tuple(start)             # <<<<<<<<<<<<<<
 *         end = state.pop("end")
 *         end = (end,) if np.ndim(end) == 0 else tuple(end)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_start) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_start);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_start);
    __Pyx_GIVEREF(__pyx_v_start);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_start);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1756
 *         start = state.pop("start")
 *         start = (start,) if np.ndim(start) == 0 else tuple(start)
 *         end = state.pop("end")             # <<<<<<<<<<<<<<
 *         end = (end,) if np.ndim(end) == 0 else tuple(end)
 *         self.start = start
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_n_u_end) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_end);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1757
 *         start = (start,) if np.ndim(start) == 0 else tuple(start)
 *         end = state.pop("end")
 *         end = (end,) if np.ndim(end) == 0 else tuple(end)             # <<<<<<<<<<<<<<
 *         self.start = start
 *         self.end = end
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_end) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_end);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_end);
    __Pyx_GIVEREF(__pyx_v_end);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_end);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1758
 *         end = state.pop("end")
 *         end = (end,) if np.ndim(end) == 0 else tuple(end)
 *         self.start = start             # <<<<<<<<<<<<<<
 *         self.end = end
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_start))||((__pyx_v_start) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_start)->tp_name), 0))) __PYX_ERR(0, 1758, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_start;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->start);
  __Pyx_DECREF(__pyx_v_self->start);
  __pyx_v_self->start = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1759
 *         end = (end,) if np.ndim(end) == 0 else tuple(end)
 *         self.start = start
 *         self.end = end             # <<<<<<<<<<<<<<
 * 
 *         state.pop("kwds", {})
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_end))||((__pyx_v_end) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_end)->tp_name), 0))) __PYX_ERR(0, 1759, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_end;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->end);
  __Pyx_DECREF(__pyx_v_self->end);
  __pyx_v_self->end = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1761
 *         self.end = end
 * 
 *         state.pop("kwds", {})             # <<<<<<<<<<<<<<
 *         state.pop("next_bday", None)
 *         BusinessMixin.__setstate__(self, state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_u_kwds, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_u_kwds, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_kwds);
    __Pyx_GIVEREF(__pyx_n_u_kwds);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_n_u_kwds);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1762
 * 
 *         state.pop("kwds", {})
 *         state.pop("next_bday", None)             # <<<<<<<<<<<<<<
 *         BusinessMixin.__setstate__(self, state)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1763
 *         state.pop("kwds", {})
 *         state.pop("next_bday", None)
 *         BusinessMixin.__setstate__(self, state)             # <<<<<<<<<<<<<<
 * 
 *     def _repr_attrs(self) -> str:
 */
  __pyx_t_3 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), __pyx_v_state, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1753
 *         self.end = end
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         start = state.pop("start")
 *         start = (start,) if np.ndim(start) == 0 else tuple(start)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1765
 *         BusinessMixin.__setstate__(self, state)
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         out = super()._repr_attrs()
 *         # Use python string formatting to be faster than strftime
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5_repr_attrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_attrs (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_4_repr_attrs(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pandas/_libs/tslibs/offsets.pyx":1769
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1769, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_repr_attrs_locals_genexpr, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!gen)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._repr_attrs.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);

  /* "pandas/_libs/tslibs/offsets.pyx":1770
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'
 *             for st, en in zip(self.start, self.end)             # <<<<<<<<<<<<<<
 *         )
 *         attrs = [f"{self._prefix}={hours}"]
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1770, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1770, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->end);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->end);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->end);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1770, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1770, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1770, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1770, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      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, 1770, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1770, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1770, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_st);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_st, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_en);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_en, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1769
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */
    __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_st, __pyx_n_s_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_kp_u_02d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__46);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__46);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__46);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_st, __pyx_n_s_minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_02d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__39);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__39);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__39);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_en, __pyx_n_s_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_kp_u_02d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__46);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__46);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_kp_u__46);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_en, __pyx_n_s_minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_02d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1770
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'
 *             for st, en in zip(self.start, self.end)             # <<<<<<<<<<<<<<
 *         )
 *         attrs = [f"{self._prefix}={hours}"]
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pandas/_libs/tslibs/offsets.pyx":1769
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1765
 *         BusinessMixin.__setstate__(self, state)
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         out = super()._repr_attrs()
 *         # Use python string formatting to be faster than strftime
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_4_repr_attrs(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *__pyx_cur_scope;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_2generator4 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr_attrs", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1765, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

  /* "pandas/_libs/tslibs/offsets.pyx":1766
 * 
 *     def _repr_attrs(self) -> str:
 *         out = super()._repr_attrs()             # <<<<<<<<<<<<<<
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour));
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_repr_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1769
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */
  __pyx_t_1 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1768
 *         out = super()._repr_attrs()
 *         # Use python string formatting to be faster than strftime
 *         hours = ",".join(             # <<<<<<<<<<<<<<
 *             f'{st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}'
 *             for st, en in zip(self.start, self.end)
 */
  __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__47, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_hours = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1772
 *             for st, en in zip(self.start, self.end)
 *         )
 *         attrs = [f"{self._prefix}={hours}"]             # <<<<<<<<<<<<<<
 *         out += ": " + ", ".join(attrs)
 *         return out
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u__18);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__18);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__18);
  __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_hours); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_v_attrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1773
 *         )
 *         attrs = [f"{self._prefix}={hours}"]
 *         out += ": " + ", ".join(attrs)             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__20, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u__19, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_out, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1774
 *         attrs = [f"{self._prefix}={hours}"]
 *         out += ": " + ", ".join(attrs)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def _get_business_hours_by_sec(self, start, end):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyUnicode_CheckExact(__pyx_v_out))||((__pyx_v_out) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_out)->tp_name), 0))) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = ((PyObject*)__pyx_v_out);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1765
 *         BusinessMixin.__setstate__(self, state)
 * 
 *     def _repr_attrs(self) -> str:             # <<<<<<<<<<<<<<
 *         out = super()._repr_attrs()
 *         # Use python string formatting to be faster than strftime
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._repr_attrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11_repr_attrs_2generator4);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1776
 *         return out
 * 
 *     def _get_business_hours_by_sec(self, start, end):             # <<<<<<<<<<<<<<
 *         """
 *         Return business hours in a day by seconds.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_7_get_business_hours_by_sec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_get_business_hours_by_sec[] = "\n        Return business hours in a day by seconds.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_7_get_business_hours_by_sec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_business_hours_by_sec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_business_hours_by_sec", 1, 2, 2, 1); __PYX_ERR(0, 1776, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_business_hours_by_sec") < 0)) __PYX_ERR(0, 1776, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_start = values[0];
    __pyx_v_end = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_business_hours_by_sec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1776, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._get_business_hours_by_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_get_business_hours_by_sec(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), __pyx_v_start, __pyx_v_end);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_get_business_hours_by_sec(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
  PyDateTime_DateTime *__pyx_v_dtstart = NULL;
  long __pyx_v_day;
  PyDateTime_DateTime *__pyx_v_until = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_business_hours_by_sec", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1781
 *         """
 *         # create dummy datetime to calculate business hours in a day
 *         dtstart = datetime(2014, 4, 1, start.hour, start.minute)             # <<<<<<<<<<<<<<
 *         day = 1 if start < end else 2
 *         until = datetime(2014, 4, day, end.hour, end.minute)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_minute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_2014);
  __Pyx_GIVEREF(__pyx_int_2014);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_2014);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_4);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_dtstart = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1782
 *         # create dummy datetime to calculate business hours in a day
 *         dtstart = datetime(2014, 4, 1, start.hour, start.minute)
 *         day = 1 if start < end else 2             # <<<<<<<<<<<<<<
 *         until = datetime(2014, 4, day, end.hour, end.minute)
 *         return int((until - dtstart).total_seconds())
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {
    __pyx_t_4 = 1;
  } else {
    __pyx_t_4 = 2;
  }
  __pyx_v_day = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":1783
 *         dtstart = datetime(2014, 4, 1, start.hour, start.minute)
 *         day = 1 if start < end else 2
 *         until = datetime(2014, 4, day, end.hour, end.minute)             # <<<<<<<<<<<<<<
 *         return int((until - dtstart).total_seconds())
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_end, __pyx_n_s_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_end, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_int_2014);
  __Pyx_GIVEREF(__pyx_int_2014);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2014);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_until = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1784
 *         day = 1 if start < end else 2
 *         until = datetime(2014, 4, day, end.hour, end.minute)
 *         return int((until - dtstart).total_seconds())             # <<<<<<<<<<<<<<
 * 
 *     def _get_closing_time(self, dt: datetime) -> datetime:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_until), ((PyObject *)__pyx_v_dtstart)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_total_seconds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1776
 *         return out
 * 
 *     def _get_business_hours_by_sec(self, start, end):             # <<<<<<<<<<<<<<
 *         """
 *         Return business hours in a day by seconds.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._get_business_hours_by_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dtstart);
  __Pyx_XDECREF((PyObject *)__pyx_v_until);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1786
 *         return int((until - dtstart).total_seconds())
 * 
 *     def _get_closing_time(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Get the closing time of a business hour interval by its opening time.
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_9_get_closing_time(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_8_get_closing_time[] = "\n        Get the closing time of a business hour interval by its opening time.\n\n        Parameters\n        ----------\n        dt : datetime\n            Opening time of a business hour interval.\n\n        Returns\n        -------\n        result : datetime\n            Corresponding closing time.\n        ";
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_9_get_closing_time(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_closing_time (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 1786, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_8_get_closing_time(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_8_get_closing_time(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_st = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_closing_time", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1800
 *             Corresponding closing time.
 *         """
 *         for i, st in enumerate(self.start):             # <<<<<<<<<<<<<<
 *             if st.hour == dt.hour and st.minute == dt.minute:
 *                 return dt + timedelta(
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;
  __pyx_t_2 = __pyx_v_self->start; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1800, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1801
 *         """
 *         for i, st in enumerate(self.start):
 *             if st.hour == dt.hour and st.minute == dt.minute:             # <<<<<<<<<<<<<<
 *                 return dt + timedelta(
 *                     seconds=self._get_business_hours_by_sec(st, self.end[i])
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_5 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_minute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1802
 *         for i, st in enumerate(self.start):
 *             if st.hour == dt.hour and st.minute == dt.minute:
 *                 return dt + timedelta(             # <<<<<<<<<<<<<<
 *                     seconds=self._get_business_hours_by_sec(st, self.end[i])
 *                 )
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));

      /* "pandas/_libs/tslibs/offsets.pyx":1803
 *             if st.hour == dt.hour and st.minute == dt.minute:
 *                 return dt + timedelta(
 *                     seconds=self._get_business_hours_by_sec(st, self.end[i])             # <<<<<<<<<<<<<<
 *                 )
 *         assert False
 */
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_business_hours_by_sec); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(__pyx_v_self->end == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1803, __pyx_L1_error)
      }
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_self->end, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_st, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_st, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_v_st);
        __Pyx_GIVEREF(__pyx_v_st);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_st);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_t_6) < 0) __PYX_ERR(0, 1803, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1802
 *         for i, st in enumerate(self.start):
 *             if st.hour == dt.hour and st.minute == dt.minute:
 *                 return dt + timedelta(             # <<<<<<<<<<<<<<
 *                     seconds=self._get_business_hours_by_sec(st, self.end[i])
 *                 )
 */
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_dt), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1802, __pyx_L1_error)
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1801
 *         """
 *         for i, st in enumerate(self.start):
 *             if st.hour == dt.hour and st.minute == dt.minute:             # <<<<<<<<<<<<<<
 *                 return dt + timedelta(
 *                     seconds=self._get_business_hours_by_sec(st, self.end[i])
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1800
 *             Corresponding closing time.
 *         """
 *         for i, st in enumerate(self.start):             # <<<<<<<<<<<<<<
 *             if st.hour == dt.hour and st.minute == dt.minute:
 *                 return dt + timedelta(
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1805
 *                     seconds=self._get_business_hours_by_sec(st, self.end[i])
 *                 )
 *         assert False             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!0)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1805, __pyx_L1_error)
    }
  }
  #endif

  /* "pandas/_libs/tslibs/offsets.pyx":1786
 *         return int((until - dtstart).total_seconds())
 * 
 *     def _get_closing_time(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Get the closing time of a business hour interval by its opening time.
 */

  /* function exit code */
  __pyx_r = ((PyDateTime_DateTime *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._get_closing_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1808
 * 
 *     @cache_readonly
 *     def next_bday(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used for moving to next business day.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11next_bday(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_10next_bday[] = "\n        Used for moving to next business day.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11next_bday(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next_bday (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_10next_bday(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_10next_bday(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self) {
  long __pyx_v_nb_offset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next_bday", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1812
 *         Used for moving to next business day.
 *         """
 *         if self.n >= 0:             # <<<<<<<<<<<<<<
 *             nb_offset = 1
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n >= 0) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1813
 *         """
 *         if self.n >= 0:
 *             nb_offset = 1             # <<<<<<<<<<<<<<
 *         else:
 *             nb_offset = -1
 */
    __pyx_v_nb_offset = 1;

    /* "pandas/_libs/tslibs/offsets.pyx":1812
 *         Used for moving to next business day.
 *         """
 *         if self.n >= 0:             # <<<<<<<<<<<<<<
 *             nb_offset = 1
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1815
 *             nb_offset = 1
 *         else:
 *             nb_offset = -1             # <<<<<<<<<<<<<<
 *         if self._prefix.startswith("C"):
 *             # CustomBusinessHour
 */
  /*else*/ {
    __pyx_v_nb_offset = -1L;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1816
 *         else:
 *             nb_offset = -1
 *         if self._prefix.startswith("C"):             # <<<<<<<<<<<<<<
 *             # CustomBusinessHour
 *             return CustomBusinessDay(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_n_u_C) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_C);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":1818
 *         if self._prefix.startswith("C"):
 *             # CustomBusinessHour
 *             return CustomBusinessDay(             # <<<<<<<<<<<<<<
 *                 n=nb_offset,
 *                 weekmask=self.weekmask,
 */
    __Pyx_XDECREF(__pyx_r);

    /* "pandas/_libs/tslibs/offsets.pyx":1819
 *             # CustomBusinessHour
 *             return CustomBusinessDay(
 *                 n=nb_offset,             # <<<<<<<<<<<<<<
 *                 weekmask=self.weekmask,
 *                 holidays=self.holidays,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_nb_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_n, __pyx_t_4) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1820
 *             return CustomBusinessDay(
 *                 n=nb_offset,
 *                 weekmask=self.weekmask,             # <<<<<<<<<<<<<<
 *                 holidays=self.holidays,
 *                 calendar=self.calendar,
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_weekmask, __pyx_v_self->__pyx_base.weekmask) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1821
 *                 n=nb_offset,
 *                 weekmask=self.weekmask,
 *                 holidays=self.holidays,             # <<<<<<<<<<<<<<
 *                 calendar=self.calendar,
 *             )
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_holidays, __pyx_v_self->__pyx_base.holidays) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1822
 *                 weekmask=self.weekmask,
 *                 holidays=self.holidays,
 *                 calendar=self.calendar,             # <<<<<<<<<<<<<<
 *             )
 *         else:
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_calendar, __pyx_v_self->__pyx_base.calendar) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1818
 *         if self._prefix.startswith("C"):
 *             # CustomBusinessHour
 *             return CustomBusinessDay(             # <<<<<<<<<<<<<<
 *                 n=nb_offset,
 *                 weekmask=self.weekmask,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1816
 *         else:
 *             nb_offset = -1
 *         if self._prefix.startswith("C"):             # <<<<<<<<<<<<<<
 *             # CustomBusinessHour
 *             return CustomBusinessDay(
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1825
 *             )
 *         else:
 *             return BusinessDay(n=nb_offset)             # <<<<<<<<<<<<<<
 * 
 *     def _next_opening_time(self, other, sign=1):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_nb_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_n, __pyx_t_2) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1808
 * 
 *     @cache_readonly
 *     def next_bday(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used for moving to next business day.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.next_bday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1827
 *             return BusinessDay(n=nb_offset)
 * 
 *     def _next_opening_time(self, other, sign=1):             # <<<<<<<<<<<<<<
 *         """
 *         If self.n and sign have the same sign, return the earliest opening time
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_13_next_opening_time(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_12_next_opening_time[] = "\n        If self.n and sign have the same sign, return the earliest opening time\n        later than or equal to current time.\n        Otherwise the latest opening time earlier than or equal to current\n        time.\n\n        Opening time always locates on BusinessDay.\n        However, closing time may not if business hour extends over midnight.\n\n        Parameters\n        ----------\n        other : datetime\n            Current time.\n        sign : int, default 1.\n            Either 1 or -1. Going forward in time if it has the same sign as\n            self.n. Going backward in time otherwise.\n\n        Returns\n        -------\n        result : datetime\n            Next opening time.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_13_next_opening_time(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_other = 0;
  PyObject *__pyx_v_sign = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_next_opening_time (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_sign,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sign);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_next_opening_time") < 0)) __PYX_ERR(0, 1827, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_other = values[0];
    __pyx_v_sign = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_next_opening_time", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1827, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._next_opening_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_12_next_opening_time(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), __pyx_v_other, __pyx_v_sign);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_12_next_opening_time(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_sign) {
  PyObject *__pyx_v_earliest_start = NULL;
  PyObject *__pyx_v_latest_start = NULL;
  PyObject *__pyx_v_hour = NULL;
  PyObject *__pyx_v_minute = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_next_opening_time", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":1850
 *             Next opening time.
 *         """
 *         earliest_start = self.start[0]             # <<<<<<<<<<<<<<
 *         latest_start = self.start[-1]
 * 
 */
  if (unlikely(__pyx_v_self->start == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1850, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->start, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_earliest_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1851
 *         """
 *         earliest_start = self.start[0]
 *         latest_start = self.start[-1]             # <<<<<<<<<<<<<<
 * 
 *         if not self.next_bday.is_on_offset(other):
 */
  if (unlikely(__pyx_v_self->start == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1851, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->start, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_latest_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1853
 *         latest_start = self.start[-1]
 * 
 *         if not self.next_bday.is_on_offset(other):             # <<<<<<<<<<<<<<
 *             # today is not business day
 *             other = other + sign * self.next_bday
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_bday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":1855
 *         if not self.next_bday.is_on_offset(other):
 *             # today is not business day
 *             other = other + sign * self.next_bday             # <<<<<<<<<<<<<<
 *             if self.n * sign >= 0:
 *                 hour, minute = earliest_start.hour, earliest_start.minute
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_bday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Multiply(__pyx_v_sign, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_v_other, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1856
 *             # today is not business day
 *             other = other + sign * self.next_bday
 *             if self.n * sign >= 0:             # <<<<<<<<<<<<<<
 *                 hour, minute = earliest_start.hour, earliest_start.minute
 *             else:
 */
    __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_v_sign); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1857
 *             other = other + sign * self.next_bday
 *             if self.n * sign >= 0:
 *                 hour, minute = earliest_start.hour, earliest_start.minute             # <<<<<<<<<<<<<<
 *             else:
 *                 hour, minute = latest_start.hour, latest_start.minute
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_earliest_start, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_earliest_start, __pyx_n_s_minute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_hour = __pyx_t_1;
      __pyx_t_1 = 0;
      __pyx_v_minute = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1856
 *             # today is not business day
 *             other = other + sign * self.next_bday
 *             if self.n * sign >= 0:             # <<<<<<<<<<<<<<
 *                 hour, minute = earliest_start.hour, earliest_start.minute
 *             else:
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1859
 *                 hour, minute = earliest_start.hour, earliest_start.minute
 *             else:
 *                 hour, minute = latest_start.hour, latest_start.minute             # <<<<<<<<<<<<<<
 *         else:
 *             if self.n * sign >= 0:
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_latest_start, __pyx_n_s_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_latest_start, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_hour = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_minute = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "pandas/_libs/tslibs/offsets.pyx":1853
 *         latest_start = self.start[-1]
 * 
 *         if not self.next_bday.is_on_offset(other):             # <<<<<<<<<<<<<<
 *             # today is not business day
 *             other = other + sign * self.next_bday
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1861
 *                 hour, minute = latest_start.hour, latest_start.minute
 *         else:
 *             if self.n * sign >= 0:             # <<<<<<<<<<<<<<
 *                 if latest_start < other.time():
 *                     # current time is after latest starting time in today
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_v_sign); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1862
 *         else:
 *             if self.n * sign >= 0:
 *                 if latest_start < other.time():             # <<<<<<<<<<<<<<
 *                     # current time is after latest starting time in today
 *                     other = other + sign * self.next_bday
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_latest_start, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pandas/_libs/tslibs/offsets.pyx":1864
 *                 if latest_start < other.time():
 *                     # current time is after latest starting time in today
 *                     other = other + sign * self.next_bday             # <<<<<<<<<<<<<<
 *                     hour, minute = earliest_start.hour, earliest_start.minute
 *                 else:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_bday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyNumber_Multiply(__pyx_v_sign, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_v_other, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1865
 *                     # current time is after latest starting time in today
 *                     other = other + sign * self.next_bday
 *                     hour, minute = earliest_start.hour, earliest_start.minute             # <<<<<<<<<<<<<<
 *                 else:
 *                     # find earliest starting time no earlier than current time
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_earliest_start, __pyx_n_s_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_earliest_start, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_hour = __pyx_t_3;
        __pyx_t_3 = 0;
        __pyx_v_minute = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1862
 *         else:
 *             if self.n * sign >= 0:
 *                 if latest_start < other.time():             # <<<<<<<<<<<<<<
 *                     # current time is after latest starting time in today
 *                     other = other + sign * self.next_bday
 */
        goto __pyx_L6;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":1868
 *                 else:
 *                     # find earliest starting time no earlier than current time
 *                     for st in self.start:             # <<<<<<<<<<<<<<
 *                         if other.time() <= st:
 *                             hour, minute = st.hour, st.minute
 */
      /*else*/ {
        if (unlikely(__pyx_v_self->start == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(0, 1868, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_v_self->start; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        for (;;) {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1868, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1868, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pandas/_libs/tslibs/offsets.pyx":1869
 *                     # find earliest starting time no earlier than current time
 *                     for st in self.start:
 *                         if other.time() <= st:             # <<<<<<<<<<<<<<
 *                             hour, minute = st.hour, st.minute
 *                             break
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1869, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1869, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_st, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1869, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1869, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_5) {

            /* "pandas/_libs/tslibs/offsets.pyx":1870
 *                     for st in self.start:
 *                         if other.time() <= st:
 *                             hour, minute = st.hour, st.minute             # <<<<<<<<<<<<<<
 *                             break
 *             else:
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_minute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_v_hour = __pyx_t_2;
            __pyx_t_2 = 0;
            __pyx_v_minute = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":1871
 *                         if other.time() <= st:
 *                             hour, minute = st.hour, st.minute
 *                             break             # <<<<<<<<<<<<<<
 *             else:
 *                 if other.time() < earliest_start:
 */
            goto __pyx_L8_break;

            /* "pandas/_libs/tslibs/offsets.pyx":1869
 *                     # find earliest starting time no earlier than current time
 *                     for st in self.start:
 *                         if other.time() <= st:             # <<<<<<<<<<<<<<
 *                             hour, minute = st.hour, st.minute
 *                             break
 */
          }

          /* "pandas/_libs/tslibs/offsets.pyx":1868
 *                 else:
 *                     # find earliest starting time no earlier than current time
 *                     for st in self.start:             # <<<<<<<<<<<<<<
 *                         if other.time() <= st:
 *                             hour, minute = st.hour, st.minute
 */
        }
        __pyx_L8_break:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L6:;

      /* "pandas/_libs/tslibs/offsets.pyx":1861
 *                 hour, minute = latest_start.hour, latest_start.minute
 *         else:
 *             if self.n * sign >= 0:             # <<<<<<<<<<<<<<
 *                 if latest_start < other.time():
 *                     # current time is after latest starting time in today
 */
      goto __pyx_L5;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1873
 *                             break
 *             else:
 *                 if other.time() < earliest_start:             # <<<<<<<<<<<<<<
 *                     # current time is before earliest starting time in today
 *                     other = other + sign * self.next_bday
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_earliest_start, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1873, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pandas/_libs/tslibs/offsets.pyx":1875
 *                 if other.time() < earliest_start:
 *                     # current time is before earliest starting time in today
 *                     other = other + sign * self.next_bday             # <<<<<<<<<<<<<<
 *                     hour, minute = latest_start.hour, latest_start.minute
 *                 else:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_bday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyNumber_Multiply(__pyx_v_sign, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_v_other, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1876
 *                     # current time is before earliest starting time in today
 *                     other = other + sign * self.next_bday
 *                     hour, minute = latest_start.hour, latest_start.minute             # <<<<<<<<<<<<<<
 *                 else:
 *                     # find latest starting time no later than current time
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_latest_start, __pyx_n_s_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_latest_start, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_hour = __pyx_t_3;
        __pyx_t_3 = 0;
        __pyx_v_minute = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1873
 *                             break
 *             else:
 *                 if other.time() < earliest_start:             # <<<<<<<<<<<<<<
 *                     # current time is before earliest starting time in today
 *                     other = other + sign * self.next_bday
 */
        goto __pyx_L10;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":1879
 *                 else:
 *                     # find latest starting time no later than current time
 *                     for st in reversed(self.start):             # <<<<<<<<<<<<<<
 *                         if other.time() >= st:
 *                             hour, minute = st.hour, st.minute
 */
      /*else*/ {
        if (unlikely(__pyx_v_self->start == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(0, 1879, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_v_self->start; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = PyTuple_GET_SIZE(__pyx_t_1) - 1;
        for (;;) {
          if (__pyx_t_6 < 0) break;
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6--; if (unlikely(0 < 0)) __PYX_ERR(0, 1879, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6--; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pandas/_libs/tslibs/offsets.pyx":1880
 *                     # find latest starting time no later than current time
 *                     for st in reversed(self.start):
 *                         if other.time() >= st:             # <<<<<<<<<<<<<<
 *                             hour, minute = st.hour, st.minute
 *                             break
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1880, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_st, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1880, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_5) {

            /* "pandas/_libs/tslibs/offsets.pyx":1881
 *                     for st in reversed(self.start):
 *                         if other.time() >= st:
 *                             hour, minute = st.hour, st.minute             # <<<<<<<<<<<<<<
 *                             break
 * 
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_minute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_v_hour = __pyx_t_2;
            __pyx_t_2 = 0;
            __pyx_v_minute = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":1882
 *                         if other.time() >= st:
 *                             hour, minute = st.hour, st.minute
 *                             break             # <<<<<<<<<<<<<<
 * 
 *         return datetime(other.year, other.month, other.day, hour, minute)
 */
            goto __pyx_L12_break;

            /* "pandas/_libs/tslibs/offsets.pyx":1880
 *                     # find latest starting time no later than current time
 *                     for st in reversed(self.start):
 *                         if other.time() >= st:             # <<<<<<<<<<<<<<
 *                             hour, minute = st.hour, st.minute
 *                             break
 */
          }

          /* "pandas/_libs/tslibs/offsets.pyx":1879
 *                 else:
 *                     # find latest starting time no later than current time
 *                     for st in reversed(self.start):             # <<<<<<<<<<<<<<
 *                         if other.time() >= st:
 *                             hour, minute = st.hour, st.minute
 */
        }
        __pyx_L12_break:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L10:;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1884
 *                             break
 * 
 *         return datetime(other.year, other.month, other.day, hour, minute)             # <<<<<<<<<<<<<<
 * 
 *     def _prev_opening_time(self, other: datetime) -> datetime:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_hour)) { __Pyx_RaiseUnboundLocalError("hour"); __PYX_ERR(0, 1884, __pyx_L1_error) }
  if (unlikely(!__pyx_v_minute)) { __Pyx_RaiseUnboundLocalError("minute"); __PYX_ERR(0, 1884, __pyx_L1_error) }
  __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_hour);
  __Pyx_GIVEREF(__pyx_v_hour);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_hour);
  __Pyx_INCREF(__pyx_v_minute);
  __Pyx_GIVEREF(__pyx_v_minute);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_minute);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1827
 *             return BusinessDay(n=nb_offset)
 * 
 *     def _next_opening_time(self, other, sign=1):             # <<<<<<<<<<<<<<
 *         """
 *         If self.n and sign have the same sign, return the earliest opening time
 */

  /* 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_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._next_opening_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_earliest_start);
  __Pyx_XDECREF(__pyx_v_latest_start);
  __Pyx_XDECREF(__pyx_v_hour);
  __Pyx_XDECREF(__pyx_v_minute);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1886
 *         return datetime(other.year, other.month, other.day, hour, minute)
 * 
 *     def _prev_opening_time(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         If n is positive, return the latest opening time earlier than or equal
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_15_prev_opening_time(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_14_prev_opening_time[] = "\n        If n is positive, return the latest opening time earlier than or equal\n        to current time.\n        Otherwise the earliest opening time later than or equal to current\n        time.\n\n        Parameters\n        ----------\n        other : datetime\n            Current time.\n\n        Returns\n        -------\n        result : datetime\n            Previous opening time.\n        ";
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_15_prev_opening_time(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_prev_opening_time (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 1886, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_14_prev_opening_time(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_14_prev_opening_time(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_prev_opening_time", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1903
 *             Previous opening time.
 *         """
 *         return self._next_opening_time(other, sign=-1)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_other));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_other));
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_sign, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1903, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1903, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1886
 *         return datetime(other.year, other.month, other.day, hour, minute)
 * 
 *     def _prev_opening_time(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         If n is positive, return the latest opening time earlier than or equal
 */

  /* 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("pandas._libs.tslibs.offsets.BusinessHour._prev_opening_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1906
 * 
 *     @apply_wraps
 *     def rollback(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date backward to next offset only if not on offset.
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_17rollback(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_16rollback[] = "\n        Roll provided date backward to next offset only if not on offset.\n        ";
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_17rollback(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollback (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 1906, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_16rollback(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_16rollback(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "pandas/_libs/tslibs/offsets.pyx":1910
 *         Roll provided date backward to next offset only if not on offset.
 *         """
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             if self.n >= 0:
 *                 dt = self._prev_opening_time(dt)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":1911
 *         """
 *         if not self.is_on_offset(dt):
 *             if self.n >= 0:             # <<<<<<<<<<<<<<
 *                 dt = self._prev_opening_time(dt)
 *             else:
 */
    __pyx_t_5 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n >= 0) != 0);
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1912
 *         if not self.is_on_offset(dt):
 *             if self.n >= 0:
 *                 dt = self._prev_opening_time(dt)             # <<<<<<<<<<<<<<
 *             else:
 *                 dt = self._next_opening_time(dt)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prev_opening_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1912, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1911
 *         """
 *         if not self.is_on_offset(dt):
 *             if self.n >= 0:             # <<<<<<<<<<<<<<
 *                 dt = self._prev_opening_time(dt)
 *             else:
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1914
 *                 dt = self._prev_opening_time(dt)
 *             else:
 *                 dt = self._next_opening_time(dt)             # <<<<<<<<<<<<<<
 *             return self._get_closing_time(dt)
 *         return dt
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1914, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_1));
      __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "pandas/_libs/tslibs/offsets.pyx":1915
 *             else:
 *                 dt = self._next_opening_time(dt)
 *             return self._get_closing_time(dt)             # <<<<<<<<<<<<<<
 *         return dt
 * 
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_closing_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1915, __pyx_L1_error)
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":1910
 *         Roll provided date backward to next offset only if not on offset.
 *         """
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             if self.n >= 0:
 *                 dt = self._prev_opening_time(dt)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1916
 *                 dt = self._next_opening_time(dt)
 *             return self._get_closing_time(dt)
 *         return dt             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_dt));
  __pyx_r = __pyx_v_dt;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1906
 * 
 *     @apply_wraps
 *     def rollback(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date backward to next offset only if not on offset.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1919
 * 
 *     @apply_wraps
 *     def rollforward(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date forward to next offset only if not on offset.
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_19rollforward(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_18rollforward[] = "\n        Roll provided date forward to next offset only if not on offset.\n        ";
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_19rollforward(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollforward (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 1919, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_18rollforward(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_18rollforward(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollforward", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":1923
 *         Roll provided date forward to next offset only if not on offset.
 *         """
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             if self.n >= 0:
 *                 return self._next_opening_time(dt)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":1924
 *         """
 *         if not self.is_on_offset(dt):
 *             if self.n >= 0:             # <<<<<<<<<<<<<<
 *                 return self._next_opening_time(dt)
 *             else:
 */
    __pyx_t_5 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n >= 0) != 0);
    if (__pyx_t_5) {

      /* "pandas/_libs/tslibs/offsets.pyx":1925
 *         if not self.is_on_offset(dt):
 *             if self.n >= 0:
 *                 return self._next_opening_time(dt)             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._prev_opening_time(dt)
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1925, __pyx_L1_error)
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":1924
 *         """
 *         if not self.is_on_offset(dt):
 *             if self.n >= 0:             # <<<<<<<<<<<<<<
 *                 return self._next_opening_time(dt)
 *             else:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1927
 *                 return self._next_opening_time(dt)
 *             else:
 *                 return self._prev_opening_time(dt)             # <<<<<<<<<<<<<<
 *         return dt
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prev_opening_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1927, __pyx_L1_error)
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1923
 *         Roll provided date forward to next offset only if not on offset.
 *         """
 *         if not self.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             if self.n >= 0:
 *                 return self._next_opening_time(dt)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1928
 *             else:
 *                 return self._prev_opening_time(dt)
 *         return dt             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_dt));
  __pyx_r = __pyx_v_dt;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1919
 * 
 *     @apply_wraps
 *     def rollforward(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date forward to next offset only if not on offset.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.rollforward", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1931
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # used for detecting edge condition
 *         nanosecond = getattr(other, "nanosecond", 0)
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_21_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_21_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 1931, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_20_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pandas/_libs/tslibs/offsets.pyx":1961
 *         # get total business hours by sec in one business day
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1961, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_apply_locals_genexpr, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!gen)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._apply.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1961, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1962
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)
 *             for st, en in zip(self.start, self.end)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1962, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1962, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->end);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->end);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->end);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1962, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1962, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1962, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1962, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      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, 1962, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1962, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1962, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_st);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_st, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_en);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_en, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1961
 *         # get total business hours by sec in one business day
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1961, __pyx_L1_error) }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s_get_business_hours_by_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_st, __pyx_cur_scope->__pyx_v_en};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_st, __pyx_cur_scope->__pyx_v_en};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_st);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_st);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_cur_scope->__pyx_v_st);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_en);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_en);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_cur_scope->__pyx_v_en);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L8_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1961, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":1962
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)
 *             for st, en in zip(self.start, self.end)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pandas/_libs/tslibs/offsets.pyx":1961
 *         # get total business hours by sec in one business day
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1931
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # used for detecting edge condition
 *         nanosecond = getattr(other, "nanosecond", 0)
 */

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_20_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *__pyx_cur_scope;
  PyObject *__pyx_v_nanosecond = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_businesshours = NULL;
  PyObject *__pyx_v_bd = NULL;
  PyObject *__pyx_v_r = NULL;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *__pyx_v_skip_bd = NULL;
  PyObject *__pyx_v_prev_open = NULL;
  PyObject *__pyx_v_remain = NULL;
  PyObject *__pyx_v_bhour_remain = NULL;
  PyObject *__pyx_v_bhour = NULL;
  PyObject *__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_2generator5 = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *)__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1931, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_INCREF((PyObject *)__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":1933
 *     def _apply(self, other: datetime) -> datetime:
 *         # used for detecting edge condition
 *         nanosecond = getattr(other, "nanosecond", 0)             # <<<<<<<<<<<<<<
 *         # reset timezone and nanosecond
 *         # other may be a Timestamp, thus not use replace
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_other), __pyx_n_u_nanosecond, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_nanosecond = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1937
 *         # other may be a Timestamp, thus not use replace
 *         other = datetime(
 *             other.year,             # <<<<<<<<<<<<<<
 *             other.month,
 *             other.day,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1938
 *         other = datetime(
 *             other.year,
 *             other.month,             # <<<<<<<<<<<<<<
 *             other.day,
 *             other.hour,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":1939
 *             other.year,
 *             other.month,
 *             other.day,             # <<<<<<<<<<<<<<
 *             other.hour,
 *             other.minute,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pandas/_libs/tslibs/offsets.pyx":1940
 *             other.month,
 *             other.day,
 *             other.hour,             # <<<<<<<<<<<<<<
 *             other.minute,
 *             other.second,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":1941
 *             other.day,
 *             other.hour,
 *             other.minute,             # <<<<<<<<<<<<<<
 *             other.second,
 *             other.microsecond,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pandas/_libs/tslibs/offsets.pyx":1942
 *             other.hour,
 *             other.minute,
 *             other.second,             # <<<<<<<<<<<<<<
 *             other.microsecond,
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "pandas/_libs/tslibs/offsets.pyx":1943
 *             other.minute,
 *             other.second,
 *             other.microsecond,             # <<<<<<<<<<<<<<
 *         )
 *         n = self.n
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_microsecond); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pandas/_libs/tslibs/offsets.pyx":1936
 *         # reset timezone and nanosecond
 *         # other may be a Timestamp, thus not use replace
 *         other = datetime(             # <<<<<<<<<<<<<<
 *             other.year,
 *             other.month,
 */
  __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
  __pyx_t_7 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1945
 *             other.microsecond,
 *         )
 *         n = self.n             # <<<<<<<<<<<<<<
 * 
 *         # adjust other to reduce number of cases to handle
 */
  __pyx_t_7 = __Pyx_PyInt_From_npy_int64(__pyx_cur_scope->__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_n = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1948
 * 
 *         # adjust other to reduce number of cases to handle
 *         if n >= 0:             # <<<<<<<<<<<<<<
 *             if other.time() in self.end or not self._is_on_offset(other):
 *                 other = self._next_opening_time(other)
 */
  __pyx_t_7 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1948, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_9) {

    /* "pandas/_libs/tslibs/offsets.pyx":1949
 *         # adjust other to reduce number of cases to handle
 *         if n >= 0:
 *             if other.time() in self.end or not self._is_on_offset(other):             # <<<<<<<<<<<<<<
 *                 other = self._next_opening_time(other)
 *         else:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_7, __pyx_cur_scope->__pyx_v_self->end, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_11 = (__pyx_t_10 != 0);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_9 = __pyx_t_11;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_is_on_offset_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_other));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = ((!__pyx_t_11) != 0);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_9) {

      /* "pandas/_libs/tslibs/offsets.pyx":1950
 *         if n >= 0:
 *             if other.time() in self.end or not self._is_on_offset(other):
 *                 other = self._next_opening_time(other)             # <<<<<<<<<<<<<<
 *         else:
 *             if other.time() in self.start:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_other));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1949
 *         # adjust other to reduce number of cases to handle
 *         if n >= 0:
 *             if other.time() in self.end or not self._is_on_offset(other):             # <<<<<<<<<<<<<<
 *                 other = self._next_opening_time(other)
 *         else:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1948
 * 
 *         # adjust other to reduce number of cases to handle
 *         if n >= 0:             # <<<<<<<<<<<<<<
 *             if other.time() in self.end or not self._is_on_offset(other):
 *                 other = self._next_opening_time(other)
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1952
 *                 other = self._next_opening_time(other)
 *         else:
 *             if other.time() in self.start:             # <<<<<<<<<<<<<<
 *                 # adjustment to move to previous business day
 *                 other = other - timedelta(seconds=1)
 */
  /*else*/ {
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_7, __pyx_cur_scope->__pyx_v_self->start, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = (__pyx_t_9 != 0);
    if (__pyx_t_10) {

      /* "pandas/_libs/tslibs/offsets.pyx":1954
 *             if other.time() in self.start:
 *                 # adjustment to move to previous business day
 *                 other = other - timedelta(seconds=1)             # <<<<<<<<<<<<<<
 *             if not self._is_on_offset(other):
 *                 other = self._next_opening_time(other)
 */
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_seconds, __pyx_int_1) < 0) __PYX_ERR(0, 1954, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_Subtract(((PyObject *)__pyx_v_other), __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1952
 *                 other = self._next_opening_time(other)
 *         else:
 *             if other.time() in self.start:             # <<<<<<<<<<<<<<
 *                 # adjustment to move to previous business day
 *                 other = other - timedelta(seconds=1)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1955
 *                 # adjustment to move to previous business day
 *                 other = other - timedelta(seconds=1)
 *             if not self._is_on_offset(other):             # <<<<<<<<<<<<<<
 *                 other = self._next_opening_time(other)
 *                 other = self._get_closing_time(other)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_is_on_offset_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_other));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1955, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = ((!__pyx_t_10) != 0);
    if (__pyx_t_9) {

      /* "pandas/_libs/tslibs/offsets.pyx":1956
 *                 other = other - timedelta(seconds=1)
 *             if not self._is_on_offset(other):
 *                 other = self._next_opening_time(other)             # <<<<<<<<<<<<<<
 *                 other = self._get_closing_time(other)
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_other));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1957
 *             if not self._is_on_offset(other):
 *                 other = self._next_opening_time(other)
 *                 other = self._get_closing_time(other)             # <<<<<<<<<<<<<<
 * 
 *         # get total business hours by sec in one business day
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_closing_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_other));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1957, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1955
 *                 # adjustment to move to previous business day
 *                 other = other - timedelta(seconds=1)
 *             if not self._is_on_offset(other):             # <<<<<<<<<<<<<<
 *                 other = self._next_opening_time(other)
 *                 other = self._get_closing_time(other)
 */
    }
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":1961
 *         # get total business hours by sec in one business day
 *         businesshours = sum(
 *             self._get_business_hours_by_sec(st, en)             # <<<<<<<<<<<<<<
 *             for st, en in zip(self.start, self.end)
 *         )
 */
  __pyx_t_7 = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pandas/_libs/tslibs/offsets.pyx":1960
 * 
 *         # get total business hours by sec in one business day
 *         businesshours = sum(             # <<<<<<<<<<<<<<
 *             self._get_business_hours_by_sec(st, en)
 *             for st, en in zip(self.start, self.end)
 */
  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_businesshours = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1965
 *         )
 * 
 *         bd, r = divmod(abs(n * 60), businesshours // 60)             # <<<<<<<<<<<<<<
 *         if n < 0:
 *             bd, r = -bd, -r
 */
  __pyx_t_8 = PyNumber_Multiply(__pyx_v_n, __pyx_int_60); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyNumber_Absolute(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_businesshours, __pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = PyNumber_Divmod(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
    PyObject* sequence = __pyx_t_6;
    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, 1965, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_8 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_8);
    index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1965, __pyx_L1_error)
    __pyx_t_12 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L10_unpacking_done;
    __pyx_L9_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1965, __pyx_L1_error)
    __pyx_L10_unpacking_done:;
  }
  __pyx_v_bd = __pyx_t_8;
  __pyx_t_8 = 0;
  __pyx_v_r = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1966
 * 
 *         bd, r = divmod(abs(n * 60), businesshours // 60)
 *         if n < 0:             # <<<<<<<<<<<<<<
 *             bd, r = -bd, -r
 * 
 */
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_9) {

    /* "pandas/_libs/tslibs/offsets.pyx":1967
 *         bd, r = divmod(abs(n * 60), businesshours // 60)
 *         if n < 0:
 *             bd, r = -bd, -r             # <<<<<<<<<<<<<<
 * 
 *         # adjust by business days first
 */
    __pyx_t_6 = PyNumber_Negative(__pyx_v_bd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyNumber_Negative(__pyx_v_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_bd, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_r, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":1966
 * 
 *         bd, r = divmod(abs(n * 60), businesshours // 60)
 *         if n < 0:             # <<<<<<<<<<<<<<
 *             bd, r = -bd, -r
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1970
 * 
 *         # adjust by business days first
 *         if bd != 0:             # <<<<<<<<<<<<<<
 *             if self._prefix.startswith("C"):
 *                 # GH#30593 this is a Custom offset
 */
  __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_v_bd, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_9) {

    /* "pandas/_libs/tslibs/offsets.pyx":1971
 *         # adjust by business days first
 *         if bd != 0:
 *             if self._prefix.startswith("C"):             # <<<<<<<<<<<<<<
 *                 # GH#30593 this is a Custom offset
 *                 skip_bd = CustomBusinessDay(
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_startswith); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_n_u_C) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_n_u_C);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1971, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_9) {

      /* "pandas/_libs/tslibs/offsets.pyx":1974
 *                 # GH#30593 this is a Custom offset
 *                 skip_bd = CustomBusinessDay(
 *                     n=bd,             # <<<<<<<<<<<<<<
 *                     weekmask=self.weekmask,
 *                     holidays=self.holidays,
 */
      __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1974, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_n, __pyx_v_bd) < 0) __PYX_ERR(0, 1974, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":1975
 *                 skip_bd = CustomBusinessDay(
 *                     n=bd,
 *                     weekmask=self.weekmask,             # <<<<<<<<<<<<<<
 *                     holidays=self.holidays,
 *                     calendar=self.calendar,
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_weekmask, __pyx_cur_scope->__pyx_v_self->__pyx_base.weekmask) < 0) __PYX_ERR(0, 1974, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":1976
 *                     n=bd,
 *                     weekmask=self.weekmask,
 *                     holidays=self.holidays,             # <<<<<<<<<<<<<<
 *                     calendar=self.calendar,
 *                 )
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_holidays, __pyx_cur_scope->__pyx_v_self->__pyx_base.holidays) < 0) __PYX_ERR(0, 1974, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":1977
 *                     weekmask=self.weekmask,
 *                     holidays=self.holidays,
 *                     calendar=self.calendar,             # <<<<<<<<<<<<<<
 *                 )
 *             else:
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_calendar, __pyx_cur_scope->__pyx_v_self->__pyx_base.calendar) < 0) __PYX_ERR(0, 1974, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":1973
 *             if self._prefix.startswith("C"):
 *                 # GH#30593 this is a Custom offset
 *                 skip_bd = CustomBusinessDay(             # <<<<<<<<<<<<<<
 *                     n=bd,
 *                     weekmask=self.weekmask,
 */
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1973, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_skip_bd = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1971
 *         # adjust by business days first
 *         if bd != 0:
 *             if self._prefix.startswith("C"):             # <<<<<<<<<<<<<<
 *                 # GH#30593 this is a Custom offset
 *                 skip_bd = CustomBusinessDay(
 */
      goto __pyx_L13;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1980
 *                 )
 *             else:
 *                 skip_bd = BusinessDay(n=bd)             # <<<<<<<<<<<<<<
 *             # midnight business hour may not on BusinessDay
 *             if not self.next_bday.is_on_offset(other):
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_n, __pyx_v_bd) < 0) __PYX_ERR(0, 1980, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay), __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_skip_bd = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_t_7);
      __pyx_t_7 = 0;
    }
    __pyx_L13:;

    /* "pandas/_libs/tslibs/offsets.pyx":1982
 *                 skip_bd = BusinessDay(n=bd)
 *             # midnight business hour may not on BusinessDay
 *             if not self.next_bday.is_on_offset(other):             # <<<<<<<<<<<<<<
 *                 prev_open = self._prev_opening_time(other)
 *                 remain = other - prev_open
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_next_bday); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_other));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = ((!__pyx_t_9) != 0);
    if (__pyx_t_10) {

      /* "pandas/_libs/tslibs/offsets.pyx":1983
 *             # midnight business hour may not on BusinessDay
 *             if not self.next_bday.is_on_offset(other):
 *                 prev_open = self._prev_opening_time(other)             # <<<<<<<<<<<<<<
 *                 remain = other - prev_open
 *                 other = prev_open + skip_bd + remain
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_prev_opening_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_other));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_prev_open = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1984
 *             if not self.next_bday.is_on_offset(other):
 *                 prev_open = self._prev_opening_time(other)
 *                 remain = other - prev_open             # <<<<<<<<<<<<<<
 *                 other = prev_open + skip_bd + remain
 *             else:
 */
      __pyx_t_7 = PyNumber_Subtract(((PyObject *)__pyx_v_other), __pyx_v_prev_open); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_remain = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1985
 *                 prev_open = self._prev_opening_time(other)
 *                 remain = other - prev_open
 *                 other = prev_open + skip_bd + remain             # <<<<<<<<<<<<<<
 *             else:
 *                 other = other + skip_bd
 */
      __pyx_t_7 = PyNumber_Add(__pyx_v_prev_open, ((PyObject *)__pyx_v_skip_bd)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_v_remain); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1985, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1982
 *                 skip_bd = BusinessDay(n=bd)
 *             # midnight business hour may not on BusinessDay
 *             if not self.next_bday.is_on_offset(other):             # <<<<<<<<<<<<<<
 *                 prev_open = self._prev_opening_time(other)
 *                 remain = other - prev_open
 */
      goto __pyx_L14;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1987
 *                 other = prev_open + skip_bd + remain
 *             else:
 *                 other = other + skip_bd             # <<<<<<<<<<<<<<
 * 
 *         # remaining business hours to adjust
 */
    /*else*/ {
      __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_skip_bd)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1987, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_6));
      __pyx_t_6 = 0;
    }
    __pyx_L14:;

    /* "pandas/_libs/tslibs/offsets.pyx":1970
 * 
 *         # adjust by business days first
 *         if bd != 0:             # <<<<<<<<<<<<<<
 *             if self._prefix.startswith("C"):
 *                 # GH#30593 this is a Custom offset
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":1990
 * 
 *         # remaining business hours to adjust
 *         bhour_remain = timedelta(minutes=r)             # <<<<<<<<<<<<<<
 * 
 *         if n >= 0:
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_minutes, __pyx_v_r) < 0) __PYX_ERR(0, 1990, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_bhour_remain = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1992
 *         bhour_remain = timedelta(minutes=r)
 * 
 *         if n >= 0:             # <<<<<<<<<<<<<<
 *             while bhour_remain != timedelta(0):
 *                 # business hour left in this business time interval
 */
  __pyx_t_7 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_10) {

    /* "pandas/_libs/tslibs/offsets.pyx":1993
 * 
 *         if n >= 0:
 *             while bhour_remain != timedelta(0):             # <<<<<<<<<<<<<<
 *                 # business hour left in this business time interval
 *                 bhour = (
 */
    while (1) {
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_bhour_remain, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_10) break;

      /* "pandas/_libs/tslibs/offsets.pyx":1996
 *                 # business hour left in this business time interval
 *                 bhour = (
 *                     self._get_closing_time(self._prev_opening_time(other)) - other             # <<<<<<<<<<<<<<
 *                 )
 *                 if bhour_remain < bhour:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_closing_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_prev_opening_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_8 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_other));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_Subtract(__pyx_t_6, ((PyObject *)__pyx_v_other)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_bhour, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":1998
 *                     self._get_closing_time(self._prev_opening_time(other)) - other
 *                 )
 *                 if bhour_remain < bhour:             # <<<<<<<<<<<<<<
 *                     # finish adjusting if possible
 *                     other += bhour_remain
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_bhour_remain, __pyx_v_bhour, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1998, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1998, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_10) {

        /* "pandas/_libs/tslibs/offsets.pyx":2000
 *                 if bhour_remain < bhour:
 *                     # finish adjusting if possible
 *                     other += bhour_remain             # <<<<<<<<<<<<<<
 *                     bhour_remain = timedelta(0)
 *                 else:
 */
        __pyx_t_7 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_other), __pyx_v_bhour_remain); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2000, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2000, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":2001
 *                     # finish adjusting if possible
 *                     other += bhour_remain
 *                     bhour_remain = timedelta(0)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # go to next business time interval
 */
        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_bhour_remain, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":1998
 *                     self._get_closing_time(self._prev_opening_time(other)) - other
 *                 )
 *                 if bhour_remain < bhour:             # <<<<<<<<<<<<<<
 *                     # finish adjusting if possible
 *                     other += bhour_remain
 */
        goto __pyx_L18;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":2004
 *                 else:
 *                     # go to next business time interval
 *                     bhour_remain -= bhour             # <<<<<<<<<<<<<<
 *                     other = self._next_opening_time(other + bhour)
 *         else:
 */
      /*else*/ {
        __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_v_bhour_remain, __pyx_v_bhour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_bhour_remain, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":2005
 *                     # go to next business time interval
 *                     bhour_remain -= bhour
 *                     other = self._next_opening_time(other + bhour)             # <<<<<<<<<<<<<<
 *         else:
 *             while bhour_remain != timedelta(0):
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_v_other), __pyx_v_bhour); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2005, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
        __pyx_t_7 = 0;
      }
      __pyx_L18:;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":1992
 *         bhour_remain = timedelta(minutes=r)
 * 
 *         if n >= 0:             # <<<<<<<<<<<<<<
 *             while bhour_remain != timedelta(0):
 *                 # business hour left in this business time interval
 */
    goto __pyx_L15;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2007
 *                     other = self._next_opening_time(other + bhour)
 *         else:
 *             while bhour_remain != timedelta(0):             # <<<<<<<<<<<<<<
 *                 # business hour left in this business time interval
 *                 bhour = self._next_opening_time(other) - other
 */
  /*else*/ {
    while (1) {
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_bhour_remain, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2007, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2007, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_10) break;

      /* "pandas/_libs/tslibs/offsets.pyx":2009
 *             while bhour_remain != timedelta(0):
 *                 # business hour left in this business time interval
 *                 bhour = self._next_opening_time(other) - other             # <<<<<<<<<<<<<<
 *                 if (
 *                     bhour_remain > bhour
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_other));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_Subtract(__pyx_t_6, ((PyObject *)__pyx_v_other)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_bhour, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":2011
 *                 bhour = self._next_opening_time(other) - other
 *                 if (
 *                     bhour_remain > bhour             # <<<<<<<<<<<<<<
 *                     or bhour_remain == bhour
 *                     and nanosecond != 0
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_bhour_remain, __pyx_v_bhour, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2011, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2011, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (!__pyx_t_9) {
      } else {
        __pyx_t_10 = __pyx_t_9;
        goto __pyx_L22_bool_binop_done;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":2012
 *                 if (
 *                     bhour_remain > bhour
 *                     or bhour_remain == bhour             # <<<<<<<<<<<<<<
 *                     and nanosecond != 0
 *                 ):
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_bhour_remain, __pyx_v_bhour, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2012, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2012, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_9) {
      } else {
        __pyx_t_10 = __pyx_t_9;
        goto __pyx_L22_bool_binop_done;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":2013
 *                     bhour_remain > bhour
 *                     or bhour_remain == bhour
 *                     and nanosecond != 0             # <<<<<<<<<<<<<<
 *                 ):
 *                     # finish adjusting if possible
 */
      __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_v_nanosecond, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2013, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = __pyx_t_9;
      __pyx_L22_bool_binop_done:;

      /* "pandas/_libs/tslibs/offsets.pyx":2010
 *                 # business hour left in this business time interval
 *                 bhour = self._next_opening_time(other) - other
 *                 if (             # <<<<<<<<<<<<<<
 *                     bhour_remain > bhour
 *                     or bhour_remain == bhour
 */
      if (__pyx_t_10) {

        /* "pandas/_libs/tslibs/offsets.pyx":2016
 *                 ):
 *                     # finish adjusting if possible
 *                     other += bhour_remain             # <<<<<<<<<<<<<<
 *                     bhour_remain = timedelta(0)
 *                 else:
 */
        __pyx_t_7 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_other), __pyx_v_bhour_remain); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2016, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2016, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":2017
 *                     # finish adjusting if possible
 *                     other += bhour_remain
 *                     bhour_remain = timedelta(0)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # go to next business time interval
 */
        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2017, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_bhour_remain, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":2010
 *                 # business hour left in this business time interval
 *                 bhour = self._next_opening_time(other) - other
 *                 if (             # <<<<<<<<<<<<<<
 *                     bhour_remain > bhour
 *                     or bhour_remain == bhour
 */
        goto __pyx_L21;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":2020
 *                 else:
 *                     # go to next business time interval
 *                     bhour_remain -= bhour             # <<<<<<<<<<<<<<
 *                     other = self._get_closing_time(
 *                         self._next_opening_time(
 */
      /*else*/ {
        __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_v_bhour_remain, __pyx_v_bhour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2020, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_bhour_remain, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":2021
 *                     # go to next business time interval
 *                     bhour_remain -= bhour
 *                     other = self._get_closing_time(             # <<<<<<<<<<<<<<
 *                         self._next_opening_time(
 *                             other + bhour - timedelta(seconds=1)
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_closing_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "pandas/_libs/tslibs/offsets.pyx":2022
 *                     bhour_remain -= bhour
 *                     other = self._get_closing_time(
 *                         self._next_opening_time(             # <<<<<<<<<<<<<<
 *                             other + bhour - timedelta(seconds=1)
 *                         )
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2022, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "pandas/_libs/tslibs/offsets.pyx":2023
 *                     other = self._get_closing_time(
 *                         self._next_opening_time(
 *                             other + bhour - timedelta(seconds=1)             # <<<<<<<<<<<<<<
 *                         )
 *                     )
 */
        __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_other), __pyx_v_bhour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2023, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2023, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_seconds, __pyx_int_1) < 0) __PYX_ERR(0, 2023, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2023, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2023, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2022, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":2021
 *                     # go to next business time interval
 *                     bhour_remain -= bhour
 *                     other = self._get_closing_time(             # <<<<<<<<<<<<<<
 *                         self._next_opening_time(
 *                             other + bhour - timedelta(seconds=1)
 */
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_other, ((PyDateTime_DateTime *)__pyx_t_7));
        __pyx_t_7 = 0;
      }
      __pyx_L21:;
    }
  }
  __pyx_L15:;

  /* "pandas/_libs/tslibs/offsets.pyx":2027
 *                     )
 * 
 *         return other             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_other));
  __pyx_r = __pyx_v_other;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":1931
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # used for detecting edge condition
 *         nanosecond = getattr(other, "nanosecond", 0)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nanosecond);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_businesshours);
  __Pyx_XDECREF(__pyx_v_bd);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF((PyObject *)__pyx_v_skip_bd);
  __Pyx_XDECREF(__pyx_v_prev_open);
  __Pyx_XDECREF(__pyx_v_remain);
  __Pyx_XDECREF(__pyx_v_bhour_remain);
  __Pyx_XDECREF(__pyx_v_bhour);
  __Pyx_XDECREF(__pyx_gb_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_apply_2generator5);
  __Pyx_XDECREF((PyObject *)__pyx_v_other);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2029
 *         return other
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_23is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_23is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2029, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_22is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_22is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "pandas/_libs/tslibs/offsets.pyx":2030
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2031
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         if dt.tzinfo is not None:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2030
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2033
 *             return False
 * 
 *         if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *             dt = datetime(
 *                 dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2035
 *         if dt.tzinfo is not None:
 *             dt = datetime(
 *                 dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond             # <<<<<<<<<<<<<<
 *             )
 *         # Valid BH can be on the different BusinessDay during midnight
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_minute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_second); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_microsecond); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "pandas/_libs/tslibs/offsets.pyx":2034
 * 
 *         if dt.tzinfo is not None:
 *             dt = datetime(             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond
 *             )
 */
    __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_9));
    __pyx_t_9 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2033
 *             return False
 * 
 *         if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *             dt = datetime(
 *                 dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2039
 *         # Valid BH can be on the different BusinessDay during midnight
 *         # Distinguish by the time spent from previous opening time
 *         return self._is_on_offset(dt)             # <<<<<<<<<<<<<<
 * 
 *     def _is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_on_offset_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_8, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_10, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2029
 *         return other
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2041
 *         return self._is_on_offset(dt)
 * 
 *     def _is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         """
 *         Slight speedups using calculated values.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_25_is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_24_is_on_offset[] = "\n        Slight speedups using calculated values.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_25_is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2041, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_24_is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_24_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_op = NULL;
  PyObject *__pyx_v_span = NULL;
  PyObject *__pyx_v_businesshours = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2049
 *         # Valid BH can be on the different BusinessDay during midnight
 *         # Distinguish by the time spent from previous opening time
 *         if self.n >= 0:             # <<<<<<<<<<<<<<
 *             op = self._prev_opening_time(dt)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n >= 0) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2050
 *         # Distinguish by the time spent from previous opening time
 *         if self.n >= 0:
 *             op = self._prev_opening_time(dt)             # <<<<<<<<<<<<<<
 *         else:
 *             op = self._next_opening_time(dt)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prev_opening_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_dt));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_op = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2049
 *         # Valid BH can be on the different BusinessDay during midnight
 *         # Distinguish by the time spent from previous opening time
 *         if self.n >= 0:             # <<<<<<<<<<<<<<
 *             op = self._prev_opening_time(dt)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2052
 *             op = self._prev_opening_time(dt)
 *         else:
 *             op = self._next_opening_time(dt)             # <<<<<<<<<<<<<<
 *         span = (dt - op).total_seconds()
 *         businesshours = 0
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next_opening_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_dt));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_op = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":2053
 *         else:
 *             op = self._next_opening_time(dt)
 *         span = (dt - op).total_seconds()             # <<<<<<<<<<<<<<
 *         businesshours = 0
 *         for i, st in enumerate(self.start):
 */
  __pyx_t_3 = PyNumber_Subtract(((PyObject *)__pyx_v_dt), __pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_total_seconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_span = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2054
 *             op = self._next_opening_time(dt)
 *         span = (dt - op).total_seconds()
 *         businesshours = 0             # <<<<<<<<<<<<<<
 *         for i, st in enumerate(self.start):
 *             if op.hour == st.hour and op.minute == st.minute:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_businesshours = __pyx_int_0;

  /* "pandas/_libs/tslibs/offsets.pyx":2055
 *         span = (dt - op).total_seconds()
 *         businesshours = 0
 *         for i, st in enumerate(self.start):             # <<<<<<<<<<<<<<
 *             if op.hour == st.hour and op.minute == st.minute:
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_2 = __pyx_int_0;
  __pyx_t_4 = __pyx_v_self->start; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2055, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2056
 *         businesshours = 0
 *         for i, st in enumerate(self.start):
 *             if op.hour == st.hour and op.minute == st.minute:             # <<<<<<<<<<<<<<
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 *         if span <= businesshours:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_1 = __pyx_t_8;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_minute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":2057
 *         for i, st in enumerate(self.start):
 *             if op.hour == st.hour and op.minute == st.minute:
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])             # <<<<<<<<<<<<<<
 *         if span <= businesshours:
 *             return True
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_business_hours_by_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__pyx_v_self->end == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 2057, __pyx_L1_error)
      }
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_self->end, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_st, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_st, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2057, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_v_st);
        __Pyx_GIVEREF(__pyx_v_st);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_st);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_businesshours, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":2056
 *         businesshours = 0
 *         for i, st in enumerate(self.start):
 *             if op.hour == st.hour and op.minute == st.minute:             # <<<<<<<<<<<<<<
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 *         if span <= businesshours:
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":2055
 *         span = (dt - op).total_seconds()
 *         businesshours = 0
 *         for i, st in enumerate(self.start):             # <<<<<<<<<<<<<<
 *             if op.hour == st.hour and op.minute == st.minute:
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2058
 *             if op.hour == st.hour and op.minute == st.minute:
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 *         if span <= businesshours:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_span, __pyx_v_businesshours, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2059
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 *         if span <= businesshours:
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2058
 *             if op.hour == st.hour and op.minute == st.minute:
 *                 businesshours = self._get_business_hours_by_sec(st, self.end[i])
 *         if span <= businesshours:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2061
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2041
 *         return self._is_on_offset(dt)
 * 
 *     def _is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         """
 *         Slight speedups using calculated values.
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.BusinessHour._is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_op);
  __Pyx_XDECREF(__pyx_v_span);
  __Pyx_XDECREF(__pyx_v_businesshours);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":1702
 * 
 *     cdef readonly:
 *         tuple start, end             # <<<<<<<<<<<<<<
 * 
 *     def __init__(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5start_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5start_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5start___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5start___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->start);
  __pyx_r = __pyx_v_self->start;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3end_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3end_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3end___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3end___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->end);
  __pyx_r = __pyx_v_self->end;
  goto __pyx_L0;

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

/* "pandas/_libs/tslibs/offsets.pyx":2072
 *         int weekday, week
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self.weekday = weekday
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekday = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekday,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2072, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekday = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2072, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2073
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 *         self.weekday = weekday
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2074
 *     def __init__(self, n=1, normalize=False, weekday=0):
 *         BaseOffset.__init__(self, n, normalize)
 *         self.weekday = weekday             # <<<<<<<<<<<<<<
 * 
 *         if weekday < 0 or weekday > 6:
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_weekday); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2074, __pyx_L1_error)
  __pyx_v_self->weekday = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2076
 *         self.weekday = weekday
 * 
 *         if weekday < 0 or weekday > 6:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Day must be 0<=day<=6, got {weekday}")
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_weekday, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_weekday, __pyx_int_6, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2077
 * 
 *         if weekday < 0 or weekday > 6:
 *             raise ValueError(f"Day must be 0<=day<=6, got {weekday}")             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_weekday, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Day_must_be_0_day_6_got, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2077, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2076
 *         self.weekday = weekday
 * 
 *         if weekday < 0 or weekday > 6:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Day must be 0<=day<=6, got {weekday}")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2072
 *         int weekday, week
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self.weekday = weekday
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2080
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         compare_day = self._get_offset_day(other)
 * 
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2080, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_2_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_compare_day = NULL;
  __pyx_t_5numpy_int64_t __pyx_v_months;
  PyObject *__pyx_v_shifted = NULL;
  PyObject *__pyx_v_to_day = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2081
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         compare_day = self._get_offset_day(other)             # <<<<<<<<<<<<<<
 * 
 *         months = self.n
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_other));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_compare_day = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2083
 *         compare_day = self._get_offset_day(other)
 * 
 *         months = self.n             # <<<<<<<<<<<<<<
 *         months = roll_convention(other.day, months, compare_day)
 * 
 */
  __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base.n;
  __pyx_v_months = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2084
 * 
 *         months = self.n
 *         months = roll_convention(other.day, months, compare_day)             # <<<<<<<<<<<<<<
 * 
 *         shifted = shift_month(other, months, "start")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_compare_day); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2084, __pyx_L1_error)
  __pyx_v_months = __pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(__pyx_t_5, __pyx_v_months, __pyx_t_6, 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2086
 *         months = roll_convention(other.day, months, compare_day)
 * 
 *         shifted = shift_month(other, months, "start")             # <<<<<<<<<<<<<<
 *         to_day = self._get_offset_day(shifted)
 *         return _shift_day(shifted, to_day - shifted.day)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_shift_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_months); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, ((PyObject *)__pyx_v_other), __pyx_t_3, __pyx_n_u_start};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, ((PyObject *)__pyx_v_other), __pyx_t_3, __pyx_n_u_start};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, ((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_INCREF(__pyx_n_u_start);
    __Pyx_GIVEREF(__pyx_n_u_start);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_6, __pyx_n_u_start);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_shifted = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2087
 * 
 *         shifted = shift_month(other, months, "start")
 *         to_day = self._get_offset_day(shifted)             # <<<<<<<<<<<<<<
 *         return _shift_day(shifted, to_day - shifted.day)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_v_shifted) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shifted);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_to_day = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2088
 *         shifted = shift_month(other, months, "start")
 *         to_day = self._get_offset_day(shifted)
 *         return _shift_day(shifted, to_day - shifted.day)             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_shifted) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_shifted, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2088, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_shifted, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_to_day, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_day(((PyDateTime_DateTime *)__pyx_v_shifted), __pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2080
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         compare_day = self._get_offset_day(other)
 * 
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_compare_day);
  __Pyx_XDECREF(__pyx_v_shifted);
  __Pyx_XDECREF(__pyx_v_to_day);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2090
 *         return _shift_day(shifted, to_day - shifted.day)
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_5is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_5is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2090, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2091
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.day == self._get_offset_day(dt)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2092
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return dt.day == self._get_offset_day(dt)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2091
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.day == self._get_offset_day(dt)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2093
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return dt.day == self._get_offset_day(dt)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2090
 *         return _shift_day(shifted, to_day - shifted.day)
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2096
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         weekday = int_to_weekday.get(self.weekday, "")
 *         if self.week == -1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self) {
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2097
 *     @property
 *     def rule_code(self) -> str:
 *         weekday = int_to_weekday.get(self.weekday, "")             # <<<<<<<<<<<<<<
 *         if self.week == -1:
 *             # LastWeekOfMonth
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_int_to_weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_kp_u__14};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_kp_u__14};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
    __Pyx_INCREF(__pyx_kp_u__14);
    __Pyx_GIVEREF(__pyx_kp_u__14);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_kp_u__14);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_weekday = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2098
 *     def rule_code(self) -> str:
 *         weekday = int_to_weekday.get(self.weekday, "")
 *         if self.week == -1:             # <<<<<<<<<<<<<<
 *             # LastWeekOfMonth
 *             return f"{self._prefix}-{weekday}"
 */
  __pyx_t_7 = ((__pyx_v_self->week == -1L) != 0);
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":2100
 *         if self.week == -1:
 *             # LastWeekOfMonth
 *             return f"{self._prefix}-{weekday}"             # <<<<<<<<<<<<<<
 *         return f"{self._prefix}-{self.week + 1}{weekday}"
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__39);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__39);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__39);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_weekday, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2098
 *     def rule_code(self) -> str:
 *         weekday = int_to_weekday.get(self.weekday, "")
 *         if self.week == -1:             # <<<<<<<<<<<<<<
 *             # LastWeekOfMonth
 *             return f"{self._prefix}-{weekday}"
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2101
 *             # LastWeekOfMonth
 *             return f"{self._prefix}-{weekday}"
 *         return f"{self._prefix}-{self.week + 1}{weekday}"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 0;
  __pyx_t_9 = 127;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
  __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_8 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u__39);
  __pyx_t_3 = __Pyx_PyUnicode_From_long((__pyx_v_self->week + 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_weekday, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
  __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2096
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         weekday = int_to_weekday.get(self.weekday, "")
 *         if self.week == -1:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2070
 * 
 *     cdef readonly:
 *         int weekday, week             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_7weekday_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_7weekday_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_7weekday___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_7weekday___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin.weekday.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4week_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4week_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4week___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4week___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->week); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonthMixin.week.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2119
 *         int month
 * 
 *     def __init__(self, n=1, normalize=False, month=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_month = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_month,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_month);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2119, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_month = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_month);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_month) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_month);

  /* "pandas/_libs/tslibs/offsets.pyx":2120
 * 
 *     def __init__(self, n=1, normalize=False, month=None):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 * 
 *         month = month if month is not None else self._default_month
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2120, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2120, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2122
 *         BaseOffset.__init__(self, n, normalize)
 * 
 *         month = month if month is not None else self._default_month             # <<<<<<<<<<<<<<
 *         self.month = month
 * 
 */
  __pyx_t_6 = (__pyx_v_month != Py_None);
  if ((__pyx_t_6 != 0)) {
    __Pyx_INCREF(__pyx_v_month);
    __pyx_t_1 = __pyx_v_month;
  } else {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_month, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2123
 * 
 *         month = month if month is not None else self._default_month
 *         self.month = month             # <<<<<<<<<<<<<<
 * 
 *         if month < 1 or month > 12:
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_month); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2123, __pyx_L1_error)
  __pyx_v_self->month = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2125
 *         self.month = month
 * 
 *         if month < 1 or month > 12:             # <<<<<<<<<<<<<<
 *             raise ValueError("Month must go from 1 to 12")
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_month, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_month, __pyx_int_12, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2126
 * 
 *         if month < 1 or month > 12:
 *             raise ValueError("Month must go from 1 to 12")             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2126, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2125
 *         self.month = month
 * 
 *         if month < 1 or month > 12:             # <<<<<<<<<<<<<<
 *             raise ValueError("Month must go from 1 to 12")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2119
 *         int month
 * 
 *     def __init__(self, n=1, normalize=False, month=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_month);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2128
 *             raise ValueError("Month must go from 1 to 12")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.month = state.pop("month")
 *         self.n = state.pop("n")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_10YearOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __pyx_t_5numpy_int64_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2129
 * 
 *     cpdef __setstate__(self, state):
 *         self.month = state.pop("month")             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_month) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_month);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->month = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2130
 *     cpdef __setstate__(self, state):
 *         self.month = state.pop("month")
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self._cache = {}
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_6 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2131
 *         self.month = state.pop("month")
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self._cache = {}
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.normalize = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2132
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self._cache = {}             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._cache);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._cache);
  __pyx_v_self->__pyx_base.__pyx_base._cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2128
 *             raise ValueError("Month must go from 1 to 12")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.month = state.pop("month")
 *         self.n = state.pop("n")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_10YearOffset___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2135
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         kwargs = {}
 *         if suffix:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 2135, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2135, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_4_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_4_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  PyObject *__pyx_v_kwargs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2136
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}             # <<<<<<<<<<<<<<
 *         if suffix:
 *             kwargs["month"] = MONTH_TO_CAL_NUM[suffix]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_kwargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2137
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}
 *         if suffix:             # <<<<<<<<<<<<<<
 *             kwargs["month"] = MONTH_TO_CAL_NUM[suffix]
 *         return cls(**kwargs)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_suffix); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2137, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2138
 *         kwargs = {}
 *         if suffix:
 *             kwargs["month"] = MONTH_TO_CAL_NUM[suffix]             # <<<<<<<<<<<<<<
 *         return cls(**kwargs)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MONTH_TO_CAL_NUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_suffix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_month, __pyx_t_3) < 0)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2137
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}
 *         if suffix:             # <<<<<<<<<<<<<<
 *             kwargs["month"] = MONTH_TO_CAL_NUM[suffix]
 *         return cls(**kwargs)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2139
 *         if suffix:
 *             kwargs["month"] = MONTH_TO_CAL_NUM[suffix]
 *         return cls(**kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2135
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         kwargs = {}
 *         if suffix:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2142
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         month = MONTH_ALIASES[self.month]
 *         return f"{self._prefix}-{month}"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self) {
  PyObject *__pyx_v_month = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_UCS4 __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2143
 *     @property
 *     def rule_code(self) -> str:
 *         month = MONTH_ALIASES[self.month]             # <<<<<<<<<<<<<<
 *         return f"{self._prefix}-{month}"
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MONTH_ALIASES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->month, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_month = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2144
 *     def rule_code(self) -> str:
 *         month = MONTH_ALIASES[self.month]
 *         return f"{self._prefix}-{month}"             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_4 = 127;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
  __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_3 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__39);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_month, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
  __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2142
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         month = MONTH_ALIASES[self.month]
 *         return f"{self._prefix}-{month}"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_month);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2146
 *         return f"{self._prefix}-{month}"
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_7is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_7is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2146, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_6is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_6is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2147
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.month == self.month and dt.day == self._get_offset_day(dt)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2148
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return dt.month == self.month and dt.day == self._get_offset_day(dt)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2147
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.month == self.month and dt.day == self._get_offset_day(dt)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2149
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return dt.month == self.month and dt.day == self._get_offset_day(dt)             # <<<<<<<<<<<<<<
 * 
 *     def _get_offset_day(self, other: datetime) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2149, __pyx_L1_error)
  if (__pyx_t_1) {
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L6_bool_binop_done:;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2146
 *         return f"{self._prefix}-{month}"
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2151
 *         return dt.month == self.month and dt.day == self._get_offset_day(dt)
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         # override BaseOffset method to use self.month instead of other.month
 *         cdef:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_offset_day (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2151, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_8_get_offset_day(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_8_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  npy_datetimestruct __pyx_v_dts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_offset_day", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2155
 *         cdef:
 *             npy_datetimestruct dts
 *         pydate_to_dtstruct(other, &dts)             # <<<<<<<<<<<<<<
 *         dts.month = self.month
 *         return get_day_of_month(&dts, self._day_opt)
 */
  if (!(likely(((((PyObject *)__pyx_v_other)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 2155, __pyx_L1_error)
  __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_pydate_to_dtstruct(((PyDateTime_Date *)__pyx_v_other), (&__pyx_v_dts));

  /* "pandas/_libs/tslibs/offsets.pyx":2156
 *             npy_datetimestruct dts
 *         pydate_to_dtstruct(other, &dts)
 *         dts.month = self.month             # <<<<<<<<<<<<<<
 *         return get_day_of_month(&dts, self._day_opt)
 * 
 */
  __pyx_t_1 = __pyx_v_self->month;
  __pyx_v_dts.month = __pyx_t_1;

  /* "pandas/_libs/tslibs/offsets.pyx":2157
 *         pydate_to_dtstruct(other, &dts)
 *         dts.month = self.month
 *         return get_day_of_month(&dts, self._day_opt)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2157, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month((&__pyx_v_dts), ((PyObject*)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2151
 *         return dt.month == self.month and dt.day == self._get_offset_day(dt)
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         # override BaseOffset method to use self.month instead of other.month
 *         cdef:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset._get_offset_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2160
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)
 *         months = years * 12 + (self.month - other.month)
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_11_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_11_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2160, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_10_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_10_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_years = NULL;
  PyObject *__pyx_v_months = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2161
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)             # <<<<<<<<<<<<<<
 *         months = years * 12 + (self.month - other.month)
 *         return shift_month(other, months, self._day_opt)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_roll_qtrday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_other));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_other));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_modby, __pyx_int_12) < 0) __PYX_ERR(0, 2161, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_years = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2162
 *     def _apply(self, other: datetime) -> datetime:
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)
 *         months = years * 12 + (self.month - other.month)             # <<<<<<<<<<<<<<
 *         return shift_month(other, months, self._day_opt)
 * 
 */
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_years, __pyx_int_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_months = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2163
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)
 *         months = years * 12 + (self.month - other.month)
 *         return shift_month(other, months, self._day_opt)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_shift_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_other), __pyx_v_months, __pyx_t_3};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_other), __pyx_v_months, __pyx_t_3};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, ((PyObject *)__pyx_v_other));
    __Pyx_INCREF(__pyx_v_months);
    __Pyx_GIVEREF(__pyx_v_months);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_months);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2163, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2160
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)
 *         months = years * 12 + (self.month - other.month)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_years);
  __Pyx_XDECREF(__pyx_v_months);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2166
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_13_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_13_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_12_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_12_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyArrayObject *__pyx_v_shifted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets_shift_quarters __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2167
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *         shifted = shift_quarters(
 *             dtarr.view("i8"), self.n, self.month, self._day_opt, modby=12, reso=reso
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 2167, __pyx_L1_error)
  __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2169
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 *             dtarr.view("i8"), self.n, self.month, self._day_opt, modby=12, reso=reso             # <<<<<<<<<<<<<<
 *         )
 *         return shifted
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_i8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2169, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2169, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":2168
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(             # <<<<<<<<<<<<<<
 *             dtarr.view("i8"), self.n, self.month, self._day_opt, modby=12, reso=reso
 *         )
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.modby = 12;
  __pyx_t_4.reso = __pyx_v_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets_shift_quarters(((PyArrayObject *)__pyx_t_1), __pyx_v_self->__pyx_base.__pyx_base.n, __pyx_v_self->month, ((PyObject*)__pyx_t_2), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_shifted = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2171
 *             dtarr.view("i8"), self.n, self.month, self._day_opt, modby=12, reso=reso
 *         )
 *         return shifted             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_shifted));
  __pyx_r = ((PyObject *)__pyx_v_shifted);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2166
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_shifted);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2117
 * 
 *     cdef readonly:
 *         int month             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, month=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5month_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5month_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5month___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5month___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearOffset.month.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2242
 *         int _period_dtype_code
 * 
 *     def __init__(self, n=1, normalize=False, month=None):             # <<<<<<<<<<<<<<
 *         # Because YearEnd can be the freq for a Period, define its
 *         #  _period_dtype_code at construction for performance
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_7YearEnd_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_7YearEnd_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_month = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_month,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_month);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2242, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_month = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2242, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearEnd.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_7YearEnd___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_month);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_7YearEnd___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_month) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2245
 *         # Because YearEnd can be the freq for a Period, define its
 *         #  _period_dtype_code at construction for performance
 *         YearOffset.__init__(self, n, normalize, month)             # <<<<<<<<<<<<<<
 *         self._period_dtype_code = PeriodDtypeCode.A + self.month % 12
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_month};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_month};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_month);
    __Pyx_GIVEREF(__pyx_v_month);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_month);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2246
 *         #  _period_dtype_code at construction for performance
 *         YearOffset.__init__(self, n, normalize, month)
 *         self._period_dtype_code = PeriodDtypeCode.A + self.month % 12             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_period_dtype_code = (__pyx_e_6pandas_5_libs_6tslibs_6dtypes_A + __Pyx_mod_long(__pyx_v_self->__pyx_base.month, 12));

  /* "pandas/_libs/tslibs/offsets.pyx":2242
 *         int _period_dtype_code
 * 
 *     def __init__(self, n=1, normalize=False, month=None):             # <<<<<<<<<<<<<<
 *         # Because YearEnd can be the freq for a Period, define its
 *         #  _period_dtype_code at construction for performance
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearEnd.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2240
 * 
 *     cdef readonly:
 *         int _period_dtype_code             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, month=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_7YearEnd_18_period_dtype_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_7YearEnd_18_period_dtype_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_7YearEnd_18_period_dtype_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_7YearEnd_18_period_dtype_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_period_dtype_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.YearEnd._period_dtype_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2281
 *         int startingMonth
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_startingMonth = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_startingMonth,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startingMonth);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2281, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_startingMonth = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2281, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_startingMonth);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_startingMonth) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_startingMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":2282
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 * 
 *         if startingMonth is None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2284
 *         BaseOffset.__init__(self, n, normalize)
 * 
 *         if startingMonth is None:             # <<<<<<<<<<<<<<
 *             startingMonth = self._default_starting_month
 *         self.startingMonth = startingMonth
 */
  __pyx_t_6 = (__pyx_v_startingMonth == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":2285
 * 
 *         if startingMonth is None:
 *             startingMonth = self._default_starting_month             # <<<<<<<<<<<<<<
 *         self.startingMonth = startingMonth
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_starting_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_startingMonth, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2284
 *         BaseOffset.__init__(self, n, normalize)
 * 
 *         if startingMonth is None:             # <<<<<<<<<<<<<<
 *             startingMonth = self._default_starting_month
 *         self.startingMonth = startingMonth
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2286
 *         if startingMonth is None:
 *             startingMonth = self._default_starting_month
 *         self.startingMonth = startingMonth             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_startingMonth); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2286, __pyx_L1_error)
  __pyx_v_self->startingMonth = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2281
 *         int startingMonth
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_startingMonth);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2288
 *         self.startingMonth = startingMonth
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.startingMonth = state.pop("startingMonth")
 *         self.n = state.pop("n")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __pyx_t_5numpy_int64_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2289
 * 
 *     cpdef __setstate__(self, state):
 *         self.startingMonth = state.pop("startingMonth")             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_startingMonth) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_startingMonth);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->startingMonth = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2290
 *     cpdef __setstate__(self, state):
 *         self.startingMonth = state.pop("startingMonth")
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_6 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2291
 *         self.startingMonth = state.pop("startingMonth")
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.normalize = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2288
 *         self.startingMonth = startingMonth
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.startingMonth = state.pop("startingMonth")
 *         self.n = state.pop("n")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2294
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         kwargs = {}
 *         if suffix:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_5_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_5_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 2294, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2294, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_4_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_4_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  PyObject *__pyx_v_kwargs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2295
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}             # <<<<<<<<<<<<<<
 *         if suffix:
 *             kwargs["startingMonth"] = MONTH_TO_CAL_NUM[suffix]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_kwargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2296
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}
 *         if suffix:             # <<<<<<<<<<<<<<
 *             kwargs["startingMonth"] = MONTH_TO_CAL_NUM[suffix]
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_suffix); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2296, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2297
 *         kwargs = {}
 *         if suffix:
 *             kwargs["startingMonth"] = MONTH_TO_CAL_NUM[suffix]             # <<<<<<<<<<<<<<
 *         else:
 *             if cls._from_name_starting_month is not None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MONTH_TO_CAL_NUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_suffix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_startingMonth, __pyx_t_3) < 0)) __PYX_ERR(0, 2297, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2296
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}
 *         if suffix:             # <<<<<<<<<<<<<<
 *             kwargs["startingMonth"] = MONTH_TO_CAL_NUM[suffix]
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2299
 *             kwargs["startingMonth"] = MONTH_TO_CAL_NUM[suffix]
 *         else:
 *             if cls._from_name_starting_month is not None:             # <<<<<<<<<<<<<<
 *                 kwargs["startingMonth"] = cls._from_name_starting_month
 *         return cls(**kwargs)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_from_name_starting_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__pyx_t_2 != 0);
    if (__pyx_t_4) {

      /* "pandas/_libs/tslibs/offsets.pyx":2300
 *         else:
 *             if cls._from_name_starting_month is not None:
 *                 kwargs["startingMonth"] = cls._from_name_starting_month             # <<<<<<<<<<<<<<
 *         return cls(**kwargs)
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_from_name_starting_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_startingMonth, __pyx_t_3) < 0)) __PYX_ERR(0, 2300, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":2299
 *             kwargs["startingMonth"] = MONTH_TO_CAL_NUM[suffix]
 *         else:
 *             if cls._from_name_starting_month is not None:             # <<<<<<<<<<<<<<
 *                 kwargs["startingMonth"] = cls._from_name_starting_month
 *         return cls(**kwargs)
 */
    }
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":2301
 *             if cls._from_name_starting_month is not None:
 *                 kwargs["startingMonth"] = cls._from_name_starting_month
 *         return cls(**kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2294
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         kwargs = {}
 *         if suffix:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2304
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         month = MONTH_ALIASES[self.startingMonth]
 *         return f"{self._prefix}-{month}"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self) {
  PyObject *__pyx_v_month = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_UCS4 __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2305
 *     @property
 *     def rule_code(self) -> str:
 *         month = MONTH_ALIASES[self.startingMonth]             # <<<<<<<<<<<<<<
 *         return f"{self._prefix}-{month}"
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MONTH_ALIASES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->startingMonth, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_month = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2306
 *     def rule_code(self) -> str:
 *         month = MONTH_ALIASES[self.startingMonth]
 *         return f"{self._prefix}-{month}"             # <<<<<<<<<<<<<<
 * 
 *     def is_anchored(self) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_4 = 127;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
  __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_3 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__39);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_month, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
  __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2304
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         month = MONTH_ALIASES[self.startingMonth]
 *         return f"{self._prefix}-{month}"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_month);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2308
 *         return f"{self._prefix}-{month}"
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return self.n == 1 and self.startingMonth is not None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_7is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_7is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_anchored (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_6is_anchored(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":2309
 * 
 *     def is_anchored(self) -> bool:
 *         return self.n == 1 and self.startingMonth is not None             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.n == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->startingMonth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2308
 *         return f"{self._prefix}-{month}"
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return self.n == 1 and self.startingMonth is not None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.is_anchored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2311
 *         return self.n == 1 and self.startingMonth is not None
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2311, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_8is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_8is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_mod_month = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2312
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         mod_month = (dt.month - self.startingMonth) % 3
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2313
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         mod_month = (dt.month - self.startingMonth) % 3
 *         return mod_month == 0 and dt.day == self._get_offset_day(dt)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2312
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         mod_month = (dt.month - self.startingMonth) % 3
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2314
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         mod_month = (dt.month - self.startingMonth) % 3             # <<<<<<<<<<<<<<
 *         return mod_month == 0 and dt.day == self._get_offset_day(dt)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->startingMonth); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_RemainderObjC(__pyx_t_5, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_mod_month = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2315
 *             return False
 *         mod_month = (dt.month - self.startingMonth) % 3
 *         return mod_month == 0 and dt.day == self._get_offset_day(dt)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_mod_month, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2315, __pyx_L1_error)
  if (__pyx_t_1) {
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_4 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = __pyx_t_6;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_L6_bool_binop_done:;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2311
 *         return self.n == 1 and self.startingMonth is not None
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mod_month);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2318
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # months_since: find the calendar quarter containing other.month,
 *         # e.g. if other.month == 8, the calendar quarter is [Jul, Aug, Sep].
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_11_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_11_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2318, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_10_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_10_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_months_since = NULL;
  PyObject *__pyx_v_qtrs = NULL;
  PyObject *__pyx_v_months = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2324
 *         # self.  `months_since` is the number of months to shift other.month
 *         # to get to this on-offset month.
 *         months_since = other.month % 3 - self.startingMonth % 3             # <<<<<<<<<<<<<<
 *         qtrs = roll_qtrday(
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_t_1, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_mod_long(__pyx_v_self->startingMonth, 3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_months_since = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2325
 *         # to get to this on-offset month.
 *         months_since = other.month % 3 - self.startingMonth % 3
 *         qtrs = roll_qtrday(             # <<<<<<<<<<<<<<
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_roll_qtrday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pandas/_libs/tslibs/offsets.pyx":2326
 *         months_since = other.month % 3 - self.startingMonth % 3
 *         qtrs = roll_qtrday(
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3             # <<<<<<<<<<<<<<
 *         )
 *         months = qtrs * 3 - months_since
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->startingMonth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":2325
 *         # to get to this on-offset month.
 *         months_since = other.month % 3 - self.startingMonth % 3
 *         qtrs = roll_qtrday(             # <<<<<<<<<<<<<<
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3
 *         )
 */
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_other));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_other));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2326
 *         months_since = other.month % 3 - self.startingMonth % 3
 *         qtrs = roll_qtrday(
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3             # <<<<<<<<<<<<<<
 *         )
 *         months = qtrs * 3 - months_since
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_day_opt_2, __pyx_t_1) < 0) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_modby, __pyx_int_3) < 0) __PYX_ERR(0, 2326, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":2325
 *         # to get to this on-offset month.
 *         months_since = other.month % 3 - self.startingMonth % 3
 *         qtrs = roll_qtrday(             # <<<<<<<<<<<<<<
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3
 *         )
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_qtrs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2328
 *             other, self.n, self.startingMonth, day_opt=self._day_opt, modby=3
 *         )
 *         months = qtrs * 3 - months_since             # <<<<<<<<<<<<<<
 *         return shift_month(other, months, self._day_opt)
 * 
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_qtrs, __pyx_int_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_months_since); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_months = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2329
 *         )
 *         months = qtrs * 3 - months_since
 *         return shift_month(other, months, self._day_opt)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_shift_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_other), __pyx_v_months, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_other), __pyx_v_months, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_other));
    __Pyx_INCREF(__pyx_v_months);
    __Pyx_GIVEREF(__pyx_v_months);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_months);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2329, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2318
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # months_since: find the calendar quarter containing other.month,
 *         # e.g. if other.month == 8, the calendar quarter is [Jul, Aug, Sep].
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_months_since);
  __Pyx_XDECREF(__pyx_v_qtrs);
  __Pyx_XDECREF(__pyx_v_months);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2332
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_12_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_12_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyArrayObject *__pyx_v_shifted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets_shift_quarters __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2333
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *         shifted = shift_quarters(
 *             dtarr.view("i8"), self.n, self.startingMonth, self._day_opt, modby=3, reso=reso
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 2333, __pyx_L1_error)
  __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2335
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 *             dtarr.view("i8"), self.n, self.startingMonth, self._day_opt, modby=3, reso=reso             # <<<<<<<<<<<<<<
 *         )
 *         return shifted
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_i8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2335, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2335, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":2334
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(             # <<<<<<<<<<<<<<
 *             dtarr.view("i8"), self.n, self.startingMonth, self._day_opt, modby=3, reso=reso
 *         )
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.modby = 3;
  __pyx_t_4.reso = __pyx_v_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets_shift_quarters(((PyArrayObject *)__pyx_t_1), __pyx_v_self->__pyx_base.__pyx_base.n, __pyx_v_self->startingMonth, ((PyObject*)__pyx_t_2), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_shifted = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2337
 *             dtarr.view("i8"), self.n, self.startingMonth, self._day_opt, modby=3, reso=reso
 *         )
 *         return shifted             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_shifted));
  __pyx_r = ((PyObject *)__pyx_v_shifted);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2332
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_shifted);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2279
 * 
 *     cdef readonly:
 *         int startingMonth             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13startingMonth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13startingMonth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13startingMonth___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13startingMonth___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->startingMonth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterOffset.startingMonth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2417
 *         int _period_dtype_code
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):             # <<<<<<<<<<<<<<
 *         # Because QuarterEnd can be the freq for a Period, define its
 *         #  _period_dtype_code at construction for performance
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_startingMonth = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_startingMonth,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startingMonth);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2417, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_startingMonth = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2417, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterEnd.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_startingMonth);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_startingMonth) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2420
 *         # Because QuarterEnd can be the freq for a Period, define its
 *         #  _period_dtype_code at construction for performance
 *         QuarterOffset.__init__(self, n, normalize, startingMonth)             # <<<<<<<<<<<<<<
 *         self._period_dtype_code = PeriodDtypeCode.Q_DEC + self.startingMonth % 12
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_startingMonth};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_startingMonth};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_startingMonth);
    __Pyx_GIVEREF(__pyx_v_startingMonth);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_startingMonth);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2421
 *         #  _period_dtype_code at construction for performance
 *         QuarterOffset.__init__(self, n, normalize, startingMonth)
 *         self._period_dtype_code = PeriodDtypeCode.Q_DEC + self.startingMonth % 12             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_period_dtype_code = (__pyx_e_6pandas_5_libs_6tslibs_6dtypes_Q_DEC + __Pyx_mod_long(__pyx_v_self->__pyx_base.startingMonth, 12));

  /* "pandas/_libs/tslibs/offsets.pyx":2417
 *         int _period_dtype_code
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):             # <<<<<<<<<<<<<<
 *         # Because QuarterEnd can be the freq for a Period, define its
 *         #  _period_dtype_code at construction for performance
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterEnd.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2415
 * 
 *     cdef readonly:
 *         int _period_dtype_code             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, startingMonth=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_18_period_dtype_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_18_period_dtype_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_18_period_dtype_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_18_period_dtype_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_period_dtype_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.QuarterEnd._period_dtype_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2448
 * 
 * cdef class MonthOffset(SingleConstructorOffset):
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2448, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2449
 * cdef class MonthOffset(SingleConstructorOffset):
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.day == self._get_offset_day(dt)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2450
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return dt.day == self._get_offset_day(dt)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2449
 * cdef class MonthOffset(SingleConstructorOffset):
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.day == self._get_offset_day(dt)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2451
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return dt.day == self._get_offset_day(dt)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2448
 * 
 * cdef class MonthOffset(SingleConstructorOffset):
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.MonthOffset.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2454
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         compare_day = self._get_offset_day(other)
 *         n = roll_convention(other.day, self.n, compare_day)
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2454, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_2_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_compare_day = NULL;
  int __pyx_v_n;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2455
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         compare_day = self._get_offset_day(other)             # <<<<<<<<<<<<<<
 *         n = roll_convention(other.day, self.n, compare_day)
 *         return shift_month(other, n, self._day_opt)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_offset_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_other));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_compare_day = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2456
 *     def _apply(self, other: datetime) -> datetime:
 *         compare_day = self._get_offset_day(other)
 *         n = roll_convention(other.day, self.n, compare_day)             # <<<<<<<<<<<<<<
 *         return shift_month(other, n, self._day_opt)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_compare_day); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2456, __pyx_L1_error)
  __pyx_v_n = __pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.n, __pyx_t_5, 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2457
 *         compare_day = self._get_offset_day(other)
 *         n = roll_convention(other.day, self.n, compare_day)
 *         return shift_month(other, n, self._day_opt)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_shift_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, ((PyObject *)__pyx_v_other), __pyx_t_3, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, ((PyObject *)__pyx_v_other), __pyx_t_3, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, ((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_5, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2457, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2454
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         compare_day = self._get_offset_day(other)
 *         n = roll_convention(other.day, self.n, compare_day)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.MonthOffset._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_compare_day);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2460
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_months(dtarr.view("i8"), self.n, self._day_opt, reso=reso)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_5_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_5_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_4_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_4_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyObject *__pyx_v_shifted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2461
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *         shifted = shift_months(dtarr.view("i8"), self.n, self._day_opt, reso=reso)
 *         return shifted
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 2461, __pyx_L1_error)
  __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2462
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_months(dtarr.view("i8"), self.n, self._day_opt, reso=reso)             # <<<<<<<<<<<<<<
 *         return shifted
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_shift_months); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_view); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_i8);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_day_opt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(__pyx_v_reso); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_reso, __pyx_t_3) < 0) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_shifted = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2463
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_months(dtarr.view("i8"), self.n, self._day_opt, reso=reso)
 *         return shifted             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_shifted);
  __pyx_r = __pyx_v_shifted;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2460
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_months(dtarr.view("i8"), self.n, self._day_opt, reso=reso)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.MonthOffset._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_shifted);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2465
 *         return shifted
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         state.pop("_use_relativedelta", False)
 *         state.pop("offset", None)
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_7__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11MonthOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_7__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2466
 * 
 *     cpdef __setstate__(self, state):
 *         state.pop("_use_relativedelta", False)             # <<<<<<<<<<<<<<
 *         state.pop("offset", None)
 *         state.pop("_offset", None)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2466, __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;

  /* "pandas/_libs/tslibs/offsets.pyx":2467
 *     cpdef __setstate__(self, state):
 *         state.pop("_use_relativedelta", False)
 *         state.pop("offset", None)             # <<<<<<<<<<<<<<
 *         state.pop("_offset", None)
 *         state.pop("kwds", {})
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2468
 *         state.pop("_use_relativedelta", False)
 *         state.pop("offset", None)
 *         state.pop("_offset", None)             # <<<<<<<<<<<<<<
 *         state.pop("kwds", {})
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2468, __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;

  /* "pandas/_libs/tslibs/offsets.pyx":2469
 *         state.pop("offset", None)
 *         state.pop("_offset", None)
 *         state.pop("kwds", {})             # <<<<<<<<<<<<<<
 * 
 *         BaseOffset.__setstate__(self, state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_kwds, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2469, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_kwds, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2469, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_kwds);
    __Pyx_GIVEREF(__pyx_n_u_kwds);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_kwds);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2471
 *         state.pop("kwds", {})
 * 
 *         BaseOffset.__setstate__(self, state)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_state};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2471, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_state};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2471, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_state);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2465
 *         return shifted
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         state.pop("_use_relativedelta", False)
 *         state.pop("offset", None)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.MonthOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_7__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_7__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_6__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_6__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_11MonthOffset___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.MonthOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2552
 *         int day_of_month
 * 
 *     def __init__(self, n=1, normalize=False, day_of_month=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_day_of_month = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_day_of_month,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_day_of_month);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2552, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_day_of_month = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2552, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_day_of_month);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_day_of_month) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_day_of_month);

  /* "pandas/_libs/tslibs/offsets.pyx":2553
 * 
 *     def __init__(self, n=1, normalize=False, day_of_month=None):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 * 
 *         if day_of_month is None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2555
 *         BaseOffset.__init__(self, n, normalize)
 * 
 *         if day_of_month is None:             # <<<<<<<<<<<<<<
 *             day_of_month = self._default_day_of_month
 * 
 */
  __pyx_t_6 = (__pyx_v_day_of_month == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":2556
 * 
 *         if day_of_month is None:
 *             day_of_month = self._default_day_of_month             # <<<<<<<<<<<<<<
 * 
 *         self.day_of_month = int(day_of_month)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_day_of_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_day_of_month, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2555
 *         BaseOffset.__init__(self, n, normalize)
 * 
 *         if day_of_month is None:             # <<<<<<<<<<<<<<
 *             day_of_month = self._default_day_of_month
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2558
 *             day_of_month = self._default_day_of_month
 * 
 *         self.day_of_month = int(day_of_month)             # <<<<<<<<<<<<<<
 *         if not self._min_day_of_month <= self.day_of_month <= 27:
 *             raise ValueError(
 */
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_day_of_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->day_of_month = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2559
 * 
 *         self.day_of_month = int(day_of_month)
 *         if not self._min_day_of_month <= self.day_of_month <= 27:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "day_of_month must be "
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_min_day_of_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->day_of_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2559, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_5)) {
    __Pyx_DECREF(__pyx_t_5);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_27, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2559, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = ((!__pyx_t_7) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2561
 *         if not self._min_day_of_month <= self.day_of_month <= 27:
 *             raise ValueError(
 *                 "day_of_month must be "             # <<<<<<<<<<<<<<
 *                 f"{self._min_day_of_month}<=day_of_month<=27, "
 *                 f"got {self.day_of_month}"
 */
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_day_of_month_must_be);
    __pyx_t_8 += 21;
    __Pyx_GIVEREF(__pyx_kp_u_day_of_month_must_be);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_day_of_month_must_be);

    /* "pandas/_libs/tslibs/offsets.pyx":2562
 *             raise ValueError(
 *                 "day_of_month must be "
 *                 f"{self._min_day_of_month}<=day_of_month<=27, "             # <<<<<<<<<<<<<<
 *                 f"got {self.day_of_month}"
 *             )
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_min_day_of_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_day_of_month_27_got);
    __pyx_t_8 += 24;
    __Pyx_GIVEREF(__pyx_kp_u_day_of_month_27_got);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_day_of_month_27_got);

    /* "pandas/_libs/tslibs/offsets.pyx":2563
 *                 "day_of_month must be "
 *                 f"{self._min_day_of_month}<=day_of_month<=27, "
 *                 f"got {self.day_of_month}"             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_self->day_of_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2561
 *         if not self._min_day_of_month <= self.day_of_month <= 27:
 *             raise ValueError(
 *                 "day_of_month must be "             # <<<<<<<<<<<<<<
 *                 f"{self._min_day_of_month}<=day_of_month<=27, "
 *                 f"got {self.day_of_month}"
 */
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2560
 *         self.day_of_month = int(day_of_month)
 *         if not self._min_day_of_month <= self.day_of_month <= 27:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "day_of_month must be "
 *                 f"{self._min_day_of_month}<=day_of_month<=27, "
 */
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 2560, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2559
 * 
 *         self.day_of_month = int(day_of_month)
 *         if not self._min_day_of_month <= self.day_of_month <= 27:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "day_of_month must be "
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2552
 *         int day_of_month
 * 
 *     def __init__(self, n=1, normalize=False, day_of_month=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 * 
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_day_of_month);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2566
 *             )
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2567
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self.day_of_month = state.pop("day_of_month")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2568
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self.day_of_month = state.pop("day_of_month")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2569
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self.day_of_month = state.pop("day_of_month")             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_day_of_month) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_day_of_month);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->day_of_month = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2566
 *             )
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2572
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         return cls(day_of_month=suffix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_5_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_5_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 2572, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2572, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_4_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_4_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  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("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2573
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         return cls(day_of_month=suffix)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_day_of_month, __pyx_v_suffix) < 0) __PYX_ERR(0, 2573, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2572
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         return cls(day_of_month=suffix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2576
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         suffix = f"-{self.day_of_month}"
 *         return self._prefix + suffix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":2577
 *     @property
 *     def rule_code(self) -> str:
 *         suffix = f"-{self.day_of_month}"             # <<<<<<<<<<<<<<
 *         return self._prefix + suffix
 * 
 */
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_self->day_of_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u__39, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_suffix = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2578
 *     def rule_code(self) -> str:
 *         suffix = f"-{self.day_of_month}"
 *         return self._prefix + suffix             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_suffix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2576
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         suffix = f"-{self.day_of_month}"
 *         return self._prefix + suffix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_suffix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2581
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         is_start = isinstance(self, SemiMonthBegin)
 * 
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_7_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_7_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2581, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_6_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_6_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  int __pyx_v_is_start;
  PyObject *__pyx_v_n = NULL;
  __pyx_t_5numpy_int32_t __pyx_v_days_in_month;
  PyObject *__pyx_v_months = NULL;
  long __pyx_v_to_day;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  long __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2582
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         is_start = isinstance(self, SemiMonthBegin)             # <<<<<<<<<<<<<<
 * 
 *         # shift `other` to self.day_of_month, incrementing `n` if necessary
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin); 
  __pyx_v_is_start = __pyx_t_1;

  /* "pandas/_libs/tslibs/offsets.pyx":2585
 * 
 *         # shift `other` to self.day_of_month, incrementing `n` if necessary
 *         n = roll_convention(other.day, self.n, self.day_of_month)             # <<<<<<<<<<<<<<
 * 
 *         days_in_month = get_days_in_month(other.year, other.month)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(__pyx_t_3, __pyx_v_self->__pyx_base.__pyx_base.n, __pyx_v_self->day_of_month, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2587
 *         n = roll_convention(other.day, self.n, self.day_of_month)
 * 
 *         days_in_month = get_days_in_month(other.year, other.month)             # <<<<<<<<<<<<<<
 *         # For SemiMonthBegin on other.day == 1 and
 *         # SemiMonthEnd on other.day == days_in_month,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_days_in_month = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_t_3, __pyx_t_4, 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2593
 *         # incrementing/decrementing `n`, regardless of whether it is
 *         # initially positive.
 *         if is_start and (self.n <= 0 and other.day == 1):             # <<<<<<<<<<<<<<
 *             n -= 1
 *         elif (not is_start) and (self.n > 0 and other.day == days_in_month):
 */
  __pyx_t_5 = (__pyx_v_is_start != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = ((__pyx_v_self->__pyx_base.__pyx_base.n <= 0) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2594
 *         # initially positive.
 *         if is_start and (self.n <= 0 and other.day == 1):
 *             n -= 1             # <<<<<<<<<<<<<<
 *         elif (not is_start) and (self.n > 0 and other.day == days_in_month):
 *             n += 1
 */
    __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2593
 *         # incrementing/decrementing `n`, regardless of whether it is
 *         # initially positive.
 *         if is_start and (self.n <= 0 and other.day == 1):             # <<<<<<<<<<<<<<
 *             n -= 1
 *         elif (not is_start) and (self.n > 0 and other.day == days_in_month):
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2595
 *         if is_start and (self.n <= 0 and other.day == 1):
 *             n -= 1
 *         elif (not is_start) and (self.n > 0 and other.day == days_in_month):             # <<<<<<<<<<<<<<
 *             n += 1
 * 
 */
  __pyx_t_5 = ((!(__pyx_v_is_start != 0)) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_5 = ((__pyx_v_self->__pyx_base.__pyx_base.n > 0) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_days_in_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_5;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2596
 *             n -= 1
 *         elif (not is_start) and (self.n > 0 and other.day == days_in_month):
 *             n += 1             # <<<<<<<<<<<<<<
 * 
 *         if is_start:
 */
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2595
 *         if is_start and (self.n <= 0 and other.day == 1):
 *             n -= 1
 *         elif (not is_start) and (self.n > 0 and other.day == days_in_month):             # <<<<<<<<<<<<<<
 *             n += 1
 * 
 */
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":2598
 *             n += 1
 * 
 *         if is_start:             # <<<<<<<<<<<<<<
 *             months = n // 2 + n % 2
 *             to_day = 1 if n % 2 else self.day_of_month
 */
  __pyx_t_1 = (__pyx_v_is_start != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2599
 * 
 *         if is_start:
 *             months = n // 2 + n % 2             # <<<<<<<<<<<<<<
 *             to_day = 1 if n % 2 else self.day_of_month
 *         else:
 */
    __pyx_t_7 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_months = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2600
 *         if is_start:
 *             months = n // 2 + n % 2
 *             to_day = 1 if n % 2 else self.day_of_month             # <<<<<<<<<<<<<<
 *         else:
 *             months = n // 2
 */
    __pyx_t_6 = __Pyx_PyInt_RemainderObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2600, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {
      __pyx_t_8 = 1;
    } else {
      __pyx_t_8 = __pyx_v_self->day_of_month;
    }
    __pyx_v_to_day = __pyx_t_8;

    /* "pandas/_libs/tslibs/offsets.pyx":2598
 *             n += 1
 * 
 *         if is_start:             # <<<<<<<<<<<<<<
 *             months = n // 2 + n % 2
 *             to_day = 1 if n % 2 else self.day_of_month
 */
    goto __pyx_L10;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2602
 *             to_day = 1 if n % 2 else self.day_of_month
 *         else:
 *             months = n // 2             # <<<<<<<<<<<<<<
 *             to_day = 31 if n % 2 else self.day_of_month
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_months = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2603
 *         else:
 *             months = n // 2
 *             to_day = 31 if n % 2 else self.day_of_month             # <<<<<<<<<<<<<<
 * 
 *         return shift_month(other, months, to_day)
 */
    __pyx_t_6 = __Pyx_PyInt_RemainderObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2603, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {
      __pyx_t_8 = 31;
    } else {
      __pyx_t_8 = __pyx_v_self->day_of_month;
    }
    __pyx_v_to_day = __pyx_t_8;
  }
  __pyx_L10:;

  /* "pandas/_libs/tslibs/offsets.pyx":2605
 *             to_day = 31 if n % 2 else self.day_of_month
 * 
 *         return shift_month(other, months, to_day)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_shift_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_to_day); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_9, ((PyObject *)__pyx_v_other), __pyx_v_months, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_9, ((PyObject *)__pyx_v_other), __pyx_v_months, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, ((PyObject *)__pyx_v_other));
    __Pyx_INCREF(__pyx_v_months);
    __Pyx_GIVEREF(__pyx_v_months);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_v_months);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_3, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 2605, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2581
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         is_start = isinstance(self, SemiMonthBegin)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_months);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2610
 *     @cython.wraparound(False)
 *     @cython.boundscheck(False)
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray i8other = dtarr.view("i8")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_8_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_8_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyArrayObject *__pyx_v_i8other = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_int64_t __pyx_v_res_val;
  PyArrayObject *__pyx_v_out = 0;
  npy_datetimestruct __pyx_v_dts;
  int __pyx_v_months;
  int __pyx_v_to_day;
  int __pyx_v_nadj;
  int __pyx_v_n;
  int __pyx_v_days_in_month;
  int __pyx_v_day;
  int __pyx_v_anchor_dom;
  int __pyx_v_is_start;
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyArrayMultiIterObject *__pyx_v_mi = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  __pyx_t_5numpy_int32_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2612
 *     def _apply_array(self, dtarr):
 *         cdef:
 *             ndarray i8other = dtarr.view("i8")             # <<<<<<<<<<<<<<
 *             Py_ssize_t i, count = dtarr.size
 *             int64_t val, res_val
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_i8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2612, __pyx_L1_error)
  __pyx_v_i8other = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2613
 *         cdef:
 *             ndarray i8other = dtarr.view("i8")
 *             Py_ssize_t i, count = dtarr.size             # <<<<<<<<<<<<<<
 *             int64_t val, res_val
 *             ndarray out = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_count = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2615
 *             Py_ssize_t i, count = dtarr.size
 *             int64_t val, res_val
 *             ndarray out = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             npy_datetimestruct dts
 *             int months, to_day, nadj, n = self.n
 */
  __pyx_t_1 = PyArray_EMPTY(__pyx_v_i8other->nd, __pyx_v_i8other->dimensions, NPY_INT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2615, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2617
 *             ndarray out = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)
 *             npy_datetimestruct dts
 *             int months, to_day, nadj, n = self.n             # <<<<<<<<<<<<<<
 *             int days_in_month, day, anchor_dom = self.day_of_month
 *             bint is_start = isinstance(self, SemiMonthBegin)
 */
  __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx_base.n;
  __pyx_v_n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2618
 *             npy_datetimestruct dts
 *             int months, to_day, nadj, n = self.n
 *             int days_in_month, day, anchor_dom = self.day_of_month             # <<<<<<<<<<<<<<
 *             bint is_start = isinstance(self, SemiMonthBegin)
 *             NPY_DATETIMEUNIT reso = get_unit_from_dtype(dtarr.dtype)
 */
  __pyx_t_6 = __pyx_v_self->day_of_month;
  __pyx_v_anchor_dom = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2619
 *             int months, to_day, nadj, n = self.n
 *             int days_in_month, day, anchor_dom = self.day_of_month
 *             bint is_start = isinstance(self, SemiMonthBegin)             # <<<<<<<<<<<<<<
 *             NPY_DATETIMEUNIT reso = get_unit_from_dtype(dtarr.dtype)
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 */
  __pyx_t_7 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin); 
  __pyx_v_is_start = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2620
 *             int days_in_month, day, anchor_dom = self.day_of_month
 *             bint is_start = isinstance(self, SemiMonthBegin)
 *             NPY_DATETIMEUNIT reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 2620, __pyx_L1_error)
  __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2621
 *             bint is_start = isinstance(self, SemiMonthBegin)
 *             NPY_DATETIMEUNIT reso = get_unit_from_dtype(dtarr.dtype)
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = __pyx_f_5numpy_PyArray_MultiIterNew2(((PyObject *)__pyx_v_out), ((PyObject *)__pyx_v_i8other)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_broadcast))))) __PYX_ERR(0, 2621, __pyx_L1_error)
  __pyx_v_mi = ((PyArrayMultiIterObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2623
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":2624
 * 
 *         with nogil:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 */
        __pyx_t_4 = __pyx_v_count;
        __pyx_t_8 = __pyx_t_4;
        for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
          __pyx_v_i = __pyx_t_9;

          /* "pandas/_libs/tslibs/offsets.pyx":2626
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]             # <<<<<<<<<<<<<<
 * 
 *                 if val == NPY_NAT:
 */
          __pyx_v_val = (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 1))[0]);

          /* "pandas/_libs/tslibs/offsets.pyx":2628
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 * 
 */
          __pyx_t_7 = ((__pyx_v_val == __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT) != 0);
          if (__pyx_t_7) {

            /* "pandas/_libs/tslibs/offsets.pyx":2629
 * 
 *                 if val == NPY_NAT:
 *                     res_val = NPY_NAT             # <<<<<<<<<<<<<<
 * 
 *                 else:
 */
            __pyx_v_res_val = __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT;

            /* "pandas/_libs/tslibs/offsets.pyx":2628
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 * 
 */
            goto __pyx_L8;
          }

          /* "pandas/_libs/tslibs/offsets.pyx":2632
 * 
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)             # <<<<<<<<<<<<<<
 *                     day = dts.day
 * 
 */
          /*else*/ {
            pandas_datetime_to_datetimestruct(__pyx_v_val, __pyx_v_reso, (&__pyx_v_dts));

            /* "pandas/_libs/tslibs/offsets.pyx":2633
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 *                     day = dts.day             # <<<<<<<<<<<<<<
 * 
 *                     # Adjust so that we are always looking at self.day_of_month,
 */
            __pyx_t_10 = __pyx_v_dts.day;
            __pyx_v_day = __pyx_t_10;

            /* "pandas/_libs/tslibs/offsets.pyx":2637
 *                     # Adjust so that we are always looking at self.day_of_month,
 *                     #  incrementing/decrementing n if necessary.
 *                     nadj = roll_convention(day, n, anchor_dom)             # <<<<<<<<<<<<<<
 * 
 *                     days_in_month = get_days_in_month(dts.year, dts.month)
 */
            __pyx_v_nadj = __pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(__pyx_v_day, __pyx_v_n, __pyx_v_anchor_dom, 0);

            /* "pandas/_libs/tslibs/offsets.pyx":2639
 *                     nadj = roll_convention(day, n, anchor_dom)
 * 
 *                     days_in_month = get_days_in_month(dts.year, dts.month)             # <<<<<<<<<<<<<<
 *                     # For SemiMonthBegin on other.day == 1 and
 *                     #  SemiMonthEnd on other.day == days_in_month,
 */
            __pyx_v_days_in_month = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_dts.year, __pyx_v_dts.month, 0);

            /* "pandas/_libs/tslibs/offsets.pyx":2645
 *                     #  incrementing/decrementing `n`, regardless of whether it is
 *                     #  initially positive.
 *                     if is_start and (n <= 0 and day == 1):             # <<<<<<<<<<<<<<
 *                         nadj -= 1
 *                     elif (not is_start) and (n > 0 and day == days_in_month):
 */
            __pyx_t_11 = (__pyx_v_is_start != 0);
            if (__pyx_t_11) {
            } else {
              __pyx_t_7 = __pyx_t_11;
              goto __pyx_L10_bool_binop_done;
            }
            __pyx_t_11 = ((__pyx_v_n <= 0) != 0);
            if (__pyx_t_11) {
            } else {
              __pyx_t_7 = __pyx_t_11;
              goto __pyx_L10_bool_binop_done;
            }
            __pyx_t_11 = ((__pyx_v_day == 1) != 0);
            __pyx_t_7 = __pyx_t_11;
            __pyx_L10_bool_binop_done:;
            if (__pyx_t_7) {

              /* "pandas/_libs/tslibs/offsets.pyx":2646
 *                     #  initially positive.
 *                     if is_start and (n <= 0 and day == 1):
 *                         nadj -= 1             # <<<<<<<<<<<<<<
 *                     elif (not is_start) and (n > 0 and day == days_in_month):
 *                         nadj += 1
 */
              __pyx_v_nadj = (__pyx_v_nadj - 1);

              /* "pandas/_libs/tslibs/offsets.pyx":2645
 *                     #  incrementing/decrementing `n`, regardless of whether it is
 *                     #  initially positive.
 *                     if is_start and (n <= 0 and day == 1):             # <<<<<<<<<<<<<<
 *                         nadj -= 1
 *                     elif (not is_start) and (n > 0 and day == days_in_month):
 */
              goto __pyx_L9;
            }

            /* "pandas/_libs/tslibs/offsets.pyx":2647
 *                     if is_start and (n <= 0 and day == 1):
 *                         nadj -= 1
 *                     elif (not is_start) and (n > 0 and day == days_in_month):             # <<<<<<<<<<<<<<
 *                         nadj += 1
 * 
 */
            __pyx_t_11 = ((!(__pyx_v_is_start != 0)) != 0);
            if (__pyx_t_11) {
            } else {
              __pyx_t_7 = __pyx_t_11;
              goto __pyx_L13_bool_binop_done;
            }
            __pyx_t_11 = ((__pyx_v_n > 0) != 0);
            if (__pyx_t_11) {
            } else {
              __pyx_t_7 = __pyx_t_11;
              goto __pyx_L13_bool_binop_done;
            }
            __pyx_t_11 = ((__pyx_v_day == __pyx_v_days_in_month) != 0);
            __pyx_t_7 = __pyx_t_11;
            __pyx_L13_bool_binop_done:;
            if (__pyx_t_7) {

              /* "pandas/_libs/tslibs/offsets.pyx":2648
 *                         nadj -= 1
 *                     elif (not is_start) and (n > 0 and day == days_in_month):
 *                         nadj += 1             # <<<<<<<<<<<<<<
 * 
 *                     if is_start:
 */
              __pyx_v_nadj = (__pyx_v_nadj + 1);

              /* "pandas/_libs/tslibs/offsets.pyx":2647
 *                     if is_start and (n <= 0 and day == 1):
 *                         nadj -= 1
 *                     elif (not is_start) and (n > 0 and day == days_in_month):             # <<<<<<<<<<<<<<
 *                         nadj += 1
 * 
 */
            }
            __pyx_L9:;

            /* "pandas/_libs/tslibs/offsets.pyx":2650
 *                         nadj += 1
 * 
 *                     if is_start:             # <<<<<<<<<<<<<<
 *                         # See also: SemiMonthBegin._apply
 *                         months = nadj // 2 + nadj % 2
 */
            __pyx_t_7 = (__pyx_v_is_start != 0);
            if (__pyx_t_7) {

              /* "pandas/_libs/tslibs/offsets.pyx":2652
 *                     if is_start:
 *                         # See also: SemiMonthBegin._apply
 *                         months = nadj // 2 + nadj % 2             # <<<<<<<<<<<<<<
 *                         to_day = 1 if nadj % 2 else anchor_dom
 * 
 */
              __pyx_v_months = (__Pyx_div_long(__pyx_v_nadj, 2) + __Pyx_mod_long(__pyx_v_nadj, 2));

              /* "pandas/_libs/tslibs/offsets.pyx":2653
 *                         # See also: SemiMonthBegin._apply
 *                         months = nadj // 2 + nadj % 2
 *                         to_day = 1 if nadj % 2 else anchor_dom             # <<<<<<<<<<<<<<
 * 
 *                     else:
 */
              if ((__Pyx_mod_long(__pyx_v_nadj, 2) != 0)) {
                __pyx_t_6 = 1;
              } else {
                __pyx_t_6 = __pyx_v_anchor_dom;
              }
              __pyx_v_to_day = __pyx_t_6;

              /* "pandas/_libs/tslibs/offsets.pyx":2650
 *                         nadj += 1
 * 
 *                     if is_start:             # <<<<<<<<<<<<<<
 *                         # See also: SemiMonthBegin._apply
 *                         months = nadj // 2 + nadj % 2
 */
              goto __pyx_L16;
            }

            /* "pandas/_libs/tslibs/offsets.pyx":2657
 *                     else:
 *                         # See also: SemiMonthEnd._apply
 *                         months = nadj // 2             # <<<<<<<<<<<<<<
 *                         to_day = 31 if nadj % 2 else anchor_dom
 * 
 */
            /*else*/ {
              __pyx_v_months = __Pyx_div_long(__pyx_v_nadj, 2);

              /* "pandas/_libs/tslibs/offsets.pyx":2658
 *                         # See also: SemiMonthEnd._apply
 *                         months = nadj // 2
 *                         to_day = 31 if nadj % 2 else anchor_dom             # <<<<<<<<<<<<<<
 * 
 *                     dts.year = year_add_months(dts, months)
 */
              if ((__Pyx_mod_long(__pyx_v_nadj, 2) != 0)) {
                __pyx_t_6 = 31;
              } else {
                __pyx_t_6 = __pyx_v_anchor_dom;
              }
              __pyx_v_to_day = __pyx_t_6;
            }
            __pyx_L16:;

            /* "pandas/_libs/tslibs/offsets.pyx":2660
 *                         to_day = 31 if nadj % 2 else anchor_dom
 * 
 *                     dts.year = year_add_months(dts, months)             # <<<<<<<<<<<<<<
 *                     dts.month = month_add_months(dts, months)
 *                     days_in_month = get_days_in_month(dts.year, dts.month)
 */
            __pyx_v_dts.year = __pyx_f_6pandas_5_libs_6tslibs_7offsets_year_add_months(__pyx_v_dts, __pyx_v_months);

            /* "pandas/_libs/tslibs/offsets.pyx":2661
 * 
 *                     dts.year = year_add_months(dts, months)
 *                     dts.month = month_add_months(dts, months)             # <<<<<<<<<<<<<<
 *                     days_in_month = get_days_in_month(dts.year, dts.month)
 *                     dts.day = min(to_day, days_in_month)
 */
            __pyx_v_dts.month = __pyx_f_6pandas_5_libs_6tslibs_7offsets_month_add_months(__pyx_v_dts, __pyx_v_months);

            /* "pandas/_libs/tslibs/offsets.pyx":2662
 *                     dts.year = year_add_months(dts, months)
 *                     dts.month = month_add_months(dts, months)
 *                     days_in_month = get_days_in_month(dts.year, dts.month)             # <<<<<<<<<<<<<<
 *                     dts.day = min(to_day, days_in_month)
 * 
 */
            __pyx_v_days_in_month = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_dts.year, __pyx_v_dts.month, 0);

            /* "pandas/_libs/tslibs/offsets.pyx":2663
 *                     dts.month = month_add_months(dts, months)
 *                     days_in_month = get_days_in_month(dts.year, dts.month)
 *                     dts.day = min(to_day, days_in_month)             # <<<<<<<<<<<<<<
 * 
 *                     res_val = npy_datetimestruct_to_datetime(reso, &dts)
 */
            __pyx_t_6 = __pyx_v_days_in_month;
            __pyx_t_12 = __pyx_v_to_day;
            if (((__pyx_t_6 < __pyx_t_12) != 0)) {
              __pyx_t_13 = __pyx_t_6;
            } else {
              __pyx_t_13 = __pyx_t_12;
            }
            __pyx_v_dts.day = __pyx_t_13;

            /* "pandas/_libs/tslibs/offsets.pyx":2665
 *                     dts.day = min(to_day, days_in_month)
 * 
 *                     res_val = npy_datetimestruct_to_datetime(reso, &dts)             # <<<<<<<<<<<<<<
 * 
 *                 # Analogous to: out[i] = res_val
 */
            __pyx_v_res_val = npy_datetimestruct_to_datetime(__pyx_v_reso, (&__pyx_v_dts));
          }
          __pyx_L8:;

          /* "pandas/_libs/tslibs/offsets.pyx":2668
 * 
 *                 # Analogous to: out[i] = res_val
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val             # <<<<<<<<<<<<<<
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 */
          (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 0))[0]) = __pyx_v_res_val;

          /* "pandas/_libs/tslibs/offsets.pyx":2670
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
          PyArray_MultiIter_NEXT(__pyx_v_mi);
        }
      }

      /* "pandas/_libs/tslibs/offsets.pyx":2623
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2672
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2610
 *     @cython.wraparound(False)
 *     @cython.boundscheck(False)
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray i8other = dtarr.view("i8")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_i8other);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_mi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2550
 * 
 *     cdef readonly:
 *         int day_of_month             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, day_of_month=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_12day_of_month_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_12day_of_month_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_12day_of_month___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_12day_of_month___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->day_of_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthOffset.day_of_month.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2695
 *     _min_day_of_month = 1
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12SemiMonthEnd_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12SemiMonthEnd_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2695, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12SemiMonthEnd_is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12SemiMonthEnd_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  __pyx_t_5numpy_int32_t __pyx_v_days_in_month;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2696
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         days_in_month = get_days_in_month(dt.year, dt.month)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2697
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         days_in_month = get_days_in_month(dt.year, dt.month)
 *         return dt.day in (self.day_of_month, days_in_month)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2696
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         days_in_month = get_days_in_month(dt.year, dt.month)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2698
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         days_in_month = get_days_in_month(dt.year, dt.month)             # <<<<<<<<<<<<<<
 *         return dt.day in (self.day_of_month, days_in_month)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_days_in_month = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_t_4, __pyx_t_5, 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2699
 *             return False
 *         days_in_month = get_days_in_month(dt.year, dt.month)
 *         return dt.day in (self.day_of_month, days_in_month)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.day_of_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_days_in_month); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2695
 *     _min_day_of_month = 1
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthEnd.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2721
 *     _prefix = "SMS"
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_14SemiMonthBegin_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_14SemiMonthBegin_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2721, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_14SemiMonthBegin_is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_14SemiMonthBegin_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2722
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.day in (1, self.day_of_month)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2723
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return dt.day in (1, self.day_of_month)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2722
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return dt.day in (1, self.day_of_month)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2724
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return dt.day in (1, self.day_of_month)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.day_of_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2721
 *     _prefix = "SMS"
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.SemiMonthBegin.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2755
 *         int _period_dtype_code
 * 
 *     def __init__(self, n=1, normalize=False, weekday=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self.weekday = weekday
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekday = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekday,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2755, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekday = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2755, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2756
 * 
 *     def __init__(self, n=1, normalize=False, weekday=None):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 *         self.weekday = weekday
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2756, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2756, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2757
 *     def __init__(self, n=1, normalize=False, weekday=None):
 *         BaseOffset.__init__(self, n, normalize)
 *         self.weekday = weekday             # <<<<<<<<<<<<<<
 * 
 *         if self.weekday is not None:
 */
  __Pyx_INCREF(__pyx_v_weekday);
  __Pyx_GIVEREF(__pyx_v_weekday);
  __Pyx_GOTREF(__pyx_v_self->weekday);
  __Pyx_DECREF(__pyx_v_self->weekday);
  __pyx_v_self->weekday = __pyx_v_weekday;

  /* "pandas/_libs/tslibs/offsets.pyx":2759
 *         self.weekday = weekday
 * 
 *         if self.weekday is not None:             # <<<<<<<<<<<<<<
 *             if self.weekday < 0 or self.weekday > 6:
 *                 raise ValueError(f"Day must be 0<=day<=6, got {self.weekday}")
 */
  __pyx_t_6 = (__pyx_v_self->weekday != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":2760
 * 
 *         if self.weekday is not None:
 *             if self.weekday < 0 or self.weekday > 6:             # <<<<<<<<<<<<<<
 *                 raise ValueError(f"Day must be 0<=day<=6, got {self.weekday}")
 * 
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->weekday, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2760, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2760, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->weekday, __pyx_int_6, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2760, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2760, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_t_6;
    __pyx_L5_bool_binop_done:;
    if (unlikely(__pyx_t_7)) {

      /* "pandas/_libs/tslibs/offsets.pyx":2761
 *         if self.weekday is not None:
 *             if self.weekday < 0 or self.weekday > 6:
 *                 raise ValueError(f"Day must be 0<=day<=6, got {self.weekday}")             # <<<<<<<<<<<<<<
 * 
 *             self._period_dtype_code = PeriodDtypeCode.W_SUN + (weekday + 1) % 7
 */
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_self->weekday, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Day_must_be_0_day_6_got, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2761, __pyx_L1_error)

      /* "pandas/_libs/tslibs/offsets.pyx":2760
 * 
 *         if self.weekday is not None:
 *             if self.weekday < 0 or self.weekday > 6:             # <<<<<<<<<<<<<<
 *                 raise ValueError(f"Day must be 0<=day<=6, got {self.weekday}")
 * 
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":2763
 *                 raise ValueError(f"Day must be 0<=day<=6, got {self.weekday}")
 * 
 *             self._period_dtype_code = PeriodDtypeCode.W_SUN + (weekday + 1) % 7             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
    __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_W_SUN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_weekday, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_t_2, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->_period_dtype_code = __pyx_t_4;

    /* "pandas/_libs/tslibs/offsets.pyx":2759
 *         self.weekday = weekday
 * 
 *         if self.weekday is not None:             # <<<<<<<<<<<<<<
 *             if self.weekday < 0 or self.weekday > 6:
 *                 raise ValueError(f"Day must be 0<=day<=6, got {self.weekday}")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2755
 *         int _period_dtype_code
 * 
 *     def __init__(self, n=1, normalize=False, weekday=None):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self.weekday = weekday
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2765
 *             self._period_dtype_code = PeriodDtypeCode.W_SUN + (weekday + 1) % 7
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2765, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2766
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2767
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self.weekday = state.pop("weekday")
 *         self._cache = state.pop("_cache", {})
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2768
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")             # <<<<<<<<<<<<<<
 *         self._cache = state.pop("_cache", {})
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_weekday) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_weekday);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->weekday);
  __Pyx_DECREF(__pyx_v_self->weekday);
  __pyx_v_self->weekday = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2769
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 *         self._cache = state.pop("_cache", {})             # <<<<<<<<<<<<<<
 * 
 *     def is_anchored(self) -> bool:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_cache, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2769, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_cache, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2769, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_n_u_cache);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_n_u_cache);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._cache);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._cache);
  __pyx_v_self->__pyx_base.__pyx_base._cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2765
 *             self._period_dtype_code = PeriodDtypeCode.W_SUN + (weekday + 1) % 7
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2771
 *         self._cache = state.pop("_cache", {})
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return self.n == 1 and self.weekday is not None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_5is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_5is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_anchored (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_4is_anchored(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":2772
 * 
 *     def is_anchored(self) -> bool:
 *         return self.n == 1 and self.weekday is not None             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.n == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->weekday != Py_None);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2771
 *         self._cache = state.pop("_cache", {})
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return self.n == 1 and self.weekday is not None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.is_anchored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2775
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if self.weekday is None:
 *             return other + self.n * self._inc
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_7_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_7_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_6_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_6_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_otherDay = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/_libs/tslibs/offsets.pyx":2776
 *     @apply_wraps
 *     def _apply(self, other):
 *         if self.weekday is None:             # <<<<<<<<<<<<<<
 *             return other + self.n * self._inc
 * 
 */
  __pyx_t_1 = (__pyx_v_self->weekday == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2777
 *     def _apply(self, other):
 *         if self.weekday is None:
 *             return other + self.n * self._inc             # <<<<<<<<<<<<<<
 * 
 *         if not PyDateTime_Check(other):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_inc_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_v_other, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2776
 *     @apply_wraps
 *     def _apply(self, other):
 *         if self.weekday is None:             # <<<<<<<<<<<<<<
 *             return other + self.n * self._inc
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2779
 *             return other + self.n * self._inc
 * 
 *         if not PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Cannot add {type(other).__name__} to {type(self).__name__}"
 */
  __pyx_t_2 = ((!(PyDateTime_Check(__pyx_v_other) != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2781
 *         if not PyDateTime_Check(other):
 *             raise TypeError(
 *                 f"Cannot add {type(other).__name__} to {type(self).__name__}"             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_Cannot_add);
    __pyx_t_6 += 11;
    __Pyx_GIVEREF(__pyx_kp_u_Cannot_add);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Cannot_add);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_to);
    __pyx_t_6 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_to);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2780
 * 
 *         if not PyDateTime_Check(other):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Cannot add {type(other).__name__} to {type(self).__name__}"
 *             )
 */
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2780, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2779
 *             return other + self.n * self._inc
 * 
 *         if not PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Cannot add {type(other).__name__} to {type(self).__name__}"
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2784
 *             )
 * 
 *         k = self.n             # <<<<<<<<<<<<<<
 *         otherDay = other.weekday()
 *         if otherDay != self.weekday:
 */
  __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_k = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2785
 * 
 *         k = self.n
 *         otherDay = other.weekday()             # <<<<<<<<<<<<<<
 *         if otherDay != self.weekday:
 *             other = other + timedelta((self.weekday - otherDay) % 7)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_weekday); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_otherDay = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2786
 *         k = self.n
 *         otherDay = other.weekday()
 *         if otherDay != self.weekday:             # <<<<<<<<<<<<<<
 *             other = other + timedelta((self.weekday - otherDay) % 7)
 *             if k > 0:
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_otherDay, __pyx_v_self->weekday, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2787
 *         otherDay = other.weekday()
 *         if otherDay != self.weekday:
 *             other = other + timedelta((self.weekday - otherDay) % 7)             # <<<<<<<<<<<<<<
 *             if k > 0:
 *                 k -= 1
 */
    __pyx_t_4 = PyNumber_Subtract(__pyx_v_self->weekday, __pyx_v_otherDay); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_t_4, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_v_other, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2788
 *         if otherDay != self.weekday:
 *             other = other + timedelta((self.weekday - otherDay) % 7)
 *             if k > 0:             # <<<<<<<<<<<<<<
 *                 k -= 1
 * 
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_k, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2788, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/_libs/tslibs/offsets.pyx":2789
 *             other = other + timedelta((self.weekday - otherDay) % 7)
 *             if k > 0:
 *                 k -= 1             # <<<<<<<<<<<<<<
 * 
 *         return other + timedelta(weeks=k)
 */
      __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_k, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_k, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":2788
 *         if otherDay != self.weekday:
 *             other = other + timedelta((self.weekday - otherDay) % 7)
 *             if k > 0:             # <<<<<<<<<<<<<<
 *                 k -= 1
 * 
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":2786
 *         k = self.n
 *         otherDay = other.weekday()
 *         if otherDay != self.weekday:             # <<<<<<<<<<<<<<
 *             other = other + timedelta((self.weekday - otherDay) % 7)
 *             if k > 0:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2791
 *                 k -= 1
 * 
 *         return other + timedelta(weeks=k)             # <<<<<<<<<<<<<<
 * 
 *     @apply_array_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_weeks, __pyx_v_k) < 0) __PYX_ERR(0, 2791, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_v_other, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2775
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if self.weekday is None:
 *             return other + self.n * self._inc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_otherDay);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2794
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         if self.weekday is None:
 *             td = timedelta(days=7 * self.n)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_9_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_9_apply_array(PyObject *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_8_apply_array(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self), ((PyObject *)__pyx_v_dtarr));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_8_apply_array(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyObject *__pyx_v_dtarr) {
  PyDateTime_Delta *__pyx_v_td = NULL;
  PyObject *__pyx_v_td64 = NULL;
  NPY_DATETIMEUNIT __pyx_v_reso;
  PyObject *__pyx_v_i8other = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply_array", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2795
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         if self.weekday is None:             # <<<<<<<<<<<<<<
 *             td = timedelta(days=7 * self.n)
 *             td64 = np.timedelta64(td, "ns")
 */
  __pyx_t_1 = (__pyx_v_self->weekday == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2796
 *     def _apply_array(self, dtarr):
 *         if self.weekday is None:
 *             td = timedelta(days=7 * self.n)             # <<<<<<<<<<<<<<
 *             td64 = np.timedelta64(td, "ns")
 *             return dtarr + td64
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_npy_int64((7 * __pyx_v_self->__pyx_base.__pyx_base.n)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_days, __pyx_t_4) < 0) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_td = ((PyDateTime_Delta *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2797
 *         if self.weekday is None:
 *             td = timedelta(days=7 * self.n)
 *             td64 = np.timedelta64(td, "ns")             # <<<<<<<<<<<<<<
 *             return dtarr + td64
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_td), __pyx_n_u_ns};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2797, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_td), __pyx_n_u_ns};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2797, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_td));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_td));
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_td));
      __Pyx_INCREF(__pyx_n_u_ns);
      __Pyx_GIVEREF(__pyx_n_u_ns);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_u_ns);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_td64 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2798
 *             td = timedelta(days=7 * self.n)
 *             td64 = np.timedelta64(td, "ns")
 *             return dtarr + td64             # <<<<<<<<<<<<<<
 *         else:
 *             reso = get_unit_from_dtype(dtarr.dtype)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyNumber_Add(__pyx_v_dtarr, __pyx_v_td64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2795
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):
 *         if self.weekday is None:             # <<<<<<<<<<<<<<
 *             td = timedelta(days=7 * self.n)
 *             td64 = np.timedelta64(td, "ns")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2800
 *             return dtarr + td64
 *         else:
 *             reso = get_unit_from_dtype(dtarr.dtype)             # <<<<<<<<<<<<<<
 *             i8other = dtarr.view("i8")
 *             return self._end_apply_index(i8other, reso=reso)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 2800, __pyx_L1_error)
    __pyx_v_reso = __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype(((PyArray_Descr *)__pyx_t_4));
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2801
 *         else:
 *             reso = get_unit_from_dtype(dtarr.dtype)
 *             i8other = dtarr.view("i8")             # <<<<<<<<<<<<<<
 *             return self._end_apply_index(i8other, reso=reso)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtarr, __pyx_n_s_view); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_n_u_i8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_i8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_i8other = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2802
 *             reso = get_unit_from_dtype(dtarr.dtype)
 *             i8other = dtarr.view("i8")
 *             return self._end_apply_index(i8other, reso=reso)             # <<<<<<<<<<<<<<
 * 
 *     @cython.wraparound(False)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(((__pyx_v_i8other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_i8other, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2802, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self->__pyx_vtab)->_end_apply_index(__pyx_v_self, ((PyArrayObject *)__pyx_v_i8other), __pyx_v_reso)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2794
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         if self.weekday is None:
 *             td = timedelta(days=7 * self.n)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week._apply_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_td);
  __Pyx_XDECREF(__pyx_v_td64);
  __Pyx_XDECREF(__pyx_v_i8other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2806
 *     @cython.wraparound(False)
 *     @cython.boundscheck(False)
 *     cdef ndarray _end_apply_index(self, ndarray i8other, NPY_DATETIMEUNIT reso):             # <<<<<<<<<<<<<<
 *         """
 *         Add self to the given DatetimeIndex, specialized for case where
 */

static PyArrayObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week__end_apply_index(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyArrayObject *__pyx_v_i8other, NPY_DATETIMEUNIT __pyx_v_reso) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_int64_t __pyx_v_res_val;
  PyArrayObject *__pyx_v_out = 0;
  npy_datetimestruct __pyx_v_dts;
  int __pyx_v_wday;
  int __pyx_v_days;
  int __pyx_v_weeks;
  int __pyx_v_n;
  int __pyx_v_anchor_weekday;
  __pyx_t_5numpy_int64_t __pyx_v_DAY_PERIODS;
  PyArrayMultiIterObject *__pyx_v_mi = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  __pyx_t_5numpy_int64_t __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_6pandas_5_libs_6tslibs_6dtypes_periods_per_day __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_end_apply_index", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2821
 *         """
 *         cdef:
 *             Py_ssize_t i, count = i8other.size             # <<<<<<<<<<<<<<
 *             int64_t val, res_val
 *             ndarray out = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_i8other), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_count = __pyx_t_2;

  /* "pandas/_libs/tslibs/offsets.pyx":2823
 *             Py_ssize_t i, count = i8other.size
 *             int64_t val, res_val
 *             ndarray out = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             npy_datetimestruct dts
 *             int wday, days, weeks, n = self.n
 */
  __pyx_t_1 = PyArray_EMPTY(__pyx_v_i8other->nd, __pyx_v_i8other->dimensions, NPY_INT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2823, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2825
 *             ndarray out = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)
 *             npy_datetimestruct dts
 *             int wday, days, weeks, n = self.n             # <<<<<<<<<<<<<<
 *             int anchor_weekday = self.weekday
 *             int64_t DAY_PERIODS = periods_per_day(reso)
 */
  __pyx_t_3 = __pyx_v_self->__pyx_base.__pyx_base.n;
  __pyx_v_n = __pyx_t_3;

  /* "pandas/_libs/tslibs/offsets.pyx":2826
 *             npy_datetimestruct dts
 *             int wday, days, weeks, n = self.n
 *             int anchor_weekday = self.weekday             # <<<<<<<<<<<<<<
 *             int64_t DAY_PERIODS = periods_per_day(reso)
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->weekday); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2826, __pyx_L1_error)
  __pyx_v_anchor_weekday = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2827
 *             int wday, days, weeks, n = self.n
 *             int anchor_weekday = self.weekday
 *             int64_t DAY_PERIODS = periods_per_day(reso)             # <<<<<<<<<<<<<<
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 * 
 */
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.reso = __pyx_v_reso;
  __pyx_t_3 = __pyx_f_6pandas_5_libs_6tslibs_6dtypes_periods_per_day(0, &__pyx_t_5); if (unlikely(__pyx_t_3 == ((__pyx_t_5numpy_int64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2827, __pyx_L1_error)
  __pyx_v_DAY_PERIODS = __pyx_t_3;

  /* "pandas/_libs/tslibs/offsets.pyx":2828
 *             int anchor_weekday = self.weekday
 *             int64_t DAY_PERIODS = periods_per_day(reso)
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = __pyx_f_5numpy_PyArray_MultiIterNew2(((PyObject *)__pyx_v_out), ((PyObject *)__pyx_v_i8other)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_broadcast))))) __PYX_ERR(0, 2828, __pyx_L1_error)
  __pyx_v_mi = ((PyArrayMultiIterObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2830
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":2831
 * 
 *         with nogil:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 */
        __pyx_t_2 = __pyx_v_count;
        __pyx_t_6 = __pyx_t_2;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
          __pyx_v_i = __pyx_t_7;

          /* "pandas/_libs/tslibs/offsets.pyx":2833
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]             # <<<<<<<<<<<<<<
 * 
 *                 if val == NPY_NAT:
 */
          __pyx_v_val = (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 1))[0]);

          /* "pandas/_libs/tslibs/offsets.pyx":2835
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 *                 else:
 */
          __pyx_t_8 = ((__pyx_v_val == __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT) != 0);
          if (__pyx_t_8) {

            /* "pandas/_libs/tslibs/offsets.pyx":2836
 * 
 *                 if val == NPY_NAT:
 *                     res_val = NPY_NAT             # <<<<<<<<<<<<<<
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 */
            __pyx_v_res_val = __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT;

            /* "pandas/_libs/tslibs/offsets.pyx":2835
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 *                 else:
 */
            goto __pyx_L8;
          }

          /* "pandas/_libs/tslibs/offsets.pyx":2838
 *                     res_val = NPY_NAT
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)             # <<<<<<<<<<<<<<
 *                     wday = dayofweek(dts.year, dts.month, dts.day)
 * 
 */
          /*else*/ {
            pandas_datetime_to_datetimestruct(__pyx_v_val, __pyx_v_reso, (&__pyx_v_dts));

            /* "pandas/_libs/tslibs/offsets.pyx":2839
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 *                     wday = dayofweek(dts.year, dts.month, dts.day)             # <<<<<<<<<<<<<<
 * 
 *                     days = 0
 */
            __pyx_v_wday = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_dayofweek(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day);

            /* "pandas/_libs/tslibs/offsets.pyx":2841
 *                     wday = dayofweek(dts.year, dts.month, dts.day)
 * 
 *                     days = 0             # <<<<<<<<<<<<<<
 *                     weeks = n
 *                     if wday != anchor_weekday:
 */
            __pyx_v_days = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":2842
 * 
 *                     days = 0
 *                     weeks = n             # <<<<<<<<<<<<<<
 *                     if wday != anchor_weekday:
 *                         days = (anchor_weekday - wday) % 7
 */
            __pyx_v_weeks = __pyx_v_n;

            /* "pandas/_libs/tslibs/offsets.pyx":2843
 *                     days = 0
 *                     weeks = n
 *                     if wday != anchor_weekday:             # <<<<<<<<<<<<<<
 *                         days = (anchor_weekday - wday) % 7
 *                         if weeks > 0:
 */
            __pyx_t_8 = ((__pyx_v_wday != __pyx_v_anchor_weekday) != 0);
            if (__pyx_t_8) {

              /* "pandas/_libs/tslibs/offsets.pyx":2844
 *                     weeks = n
 *                     if wday != anchor_weekday:
 *                         days = (anchor_weekday - wday) % 7             # <<<<<<<<<<<<<<
 *                         if weeks > 0:
 *                             weeks -= 1
 */
              __pyx_v_days = __Pyx_mod_long((__pyx_v_anchor_weekday - __pyx_v_wday), 7);

              /* "pandas/_libs/tslibs/offsets.pyx":2845
 *                     if wday != anchor_weekday:
 *                         days = (anchor_weekday - wday) % 7
 *                         if weeks > 0:             # <<<<<<<<<<<<<<
 *                             weeks -= 1
 * 
 */
              __pyx_t_8 = ((__pyx_v_weeks > 0) != 0);
              if (__pyx_t_8) {

                /* "pandas/_libs/tslibs/offsets.pyx":2846
 *                         days = (anchor_weekday - wday) % 7
 *                         if weeks > 0:
 *                             weeks -= 1             # <<<<<<<<<<<<<<
 * 
 *                     res_val = val + (7 * weeks + days) * DAY_PERIODS
 */
                __pyx_v_weeks = (__pyx_v_weeks - 1);

                /* "pandas/_libs/tslibs/offsets.pyx":2845
 *                     if wday != anchor_weekday:
 *                         days = (anchor_weekday - wday) % 7
 *                         if weeks > 0:             # <<<<<<<<<<<<<<
 *                             weeks -= 1
 * 
 */
              }

              /* "pandas/_libs/tslibs/offsets.pyx":2843
 *                     days = 0
 *                     weeks = n
 *                     if wday != anchor_weekday:             # <<<<<<<<<<<<<<
 *                         days = (anchor_weekday - wday) % 7
 *                         if weeks > 0:
 */
            }

            /* "pandas/_libs/tslibs/offsets.pyx":2848
 *                             weeks -= 1
 * 
 *                     res_val = val + (7 * weeks + days) * DAY_PERIODS             # <<<<<<<<<<<<<<
 * 
 *                 # Analogous to: out[i] = res_val
 */
            __pyx_v_res_val = (__pyx_v_val + (((7 * __pyx_v_weeks) + __pyx_v_days) * __pyx_v_DAY_PERIODS));
          }
          __pyx_L8:;

          /* "pandas/_libs/tslibs/offsets.pyx":2851
 * 
 *                 # Analogous to: out[i] = res_val
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val             # <<<<<<<<<<<<<<
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 */
          (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 0))[0]) = __pyx_v_res_val;

          /* "pandas/_libs/tslibs/offsets.pyx":2853
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
          PyArray_MultiIter_NEXT(__pyx_v_mi);
        }
      }

      /* "pandas/_libs/tslibs/offsets.pyx":2830
 *             cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, i8other)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2855
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2806
 *     @cython.wraparound(False)
 *     @cython.boundscheck(False)
 *     cdef ndarray _end_apply_index(self, ndarray i8other, NPY_DATETIMEUNIT reso):             # <<<<<<<<<<<<<<
 *         """
 *         Add self to the given DatetimeIndex, specialized for case where
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week._end_apply_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_mi);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2857
 *         return out
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_11is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_11is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 2857, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_10is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_10is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2858
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         elif self.weekday is None:
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":2859
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         elif self.weekday is None:
 *             return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2858
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         elif self.weekday is None:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2860
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         elif self.weekday is None:             # <<<<<<<<<<<<<<
 *             return True
 *         return dt.weekday() == self.weekday
 */
  __pyx_t_1 = (__pyx_v_self->weekday == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2861
 *             return False
 *         elif self.weekday is None:
 *             return True             # <<<<<<<<<<<<<<
 *         return dt.weekday() == self.weekday
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":2860
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         elif self.weekday is None:             # <<<<<<<<<<<<<<
 *             return True
 *         return dt.weekday() == self.weekday
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2862
 *         elif self.weekday is None:
 *             return True
 *         return dt.weekday() == self.weekday             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_weekday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_self->weekday, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2857
 *         return out
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2865
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         suffix = ""
 *         if self.weekday is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self) {
  PyObject *__pyx_v_suffix = NULL;
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2866
 *     @property
 *     def rule_code(self) -> str:
 *         suffix = ""             # <<<<<<<<<<<<<<
 *         if self.weekday is not None:
 *             weekday = int_to_weekday[self.weekday]
 */
  __Pyx_INCREF(__pyx_kp_u__14);
  __pyx_v_suffix = __pyx_kp_u__14;

  /* "pandas/_libs/tslibs/offsets.pyx":2867
 *     def rule_code(self) -> str:
 *         suffix = ""
 *         if self.weekday is not None:             # <<<<<<<<<<<<<<
 *             weekday = int_to_weekday[self.weekday]
 *             suffix = f"-{weekday}"
 */
  __pyx_t_1 = (__pyx_v_self->weekday != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2868
 *         suffix = ""
 *         if self.weekday is not None:
 *             weekday = int_to_weekday[self.weekday]             # <<<<<<<<<<<<<<
 *             suffix = f"-{weekday}"
 *         return self._prefix + suffix
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_int_to_weekday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_self->weekday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_weekday = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2869
 *         if self.weekday is not None:
 *             weekday = int_to_weekday[self.weekday]
 *             suffix = f"-{weekday}"             # <<<<<<<<<<<<<<
 *         return self._prefix + suffix
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_weekday, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u__39, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_suffix, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":2867
 *     def rule_code(self) -> str:
 *         suffix = ""
 *         if self.weekday is not None:             # <<<<<<<<<<<<<<
 *             weekday = int_to_weekday[self.weekday]
 *             suffix = f"-{weekday}"
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2870
 *             weekday = int_to_weekday[self.weekday]
 *             suffix = f"-{weekday}"
 *         return self._prefix + suffix             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_suffix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2865
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         suffix = ""
 *         if self.weekday is not None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_suffix);
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2873
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             weekday = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_13_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_13_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 2873, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_12_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_12_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2874
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         if not suffix:             # <<<<<<<<<<<<<<
 *             weekday = None
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_suffix); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2874, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":2875
 *     def _from_name(cls, suffix=None):
 *         if not suffix:
 *             weekday = None             # <<<<<<<<<<<<<<
 *         else:
 *             weekday = weekday_to_int[suffix]
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_weekday = Py_None;

    /* "pandas/_libs/tslibs/offsets.pyx":2874
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         if not suffix:             # <<<<<<<<<<<<<<
 *             weekday = None
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2877
 *             weekday = None
 *         else:
 *             weekday = weekday_to_int[suffix]             # <<<<<<<<<<<<<<
 *         return cls(weekday=weekday)
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_weekday_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_suffix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_weekday = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":2878
 *         else:
 *             weekday = weekday_to_int[suffix]
 *         return cls(weekday=weekday)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_weekday, __pyx_v_weekday) < 0) __PYX_ERR(0, 2878, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2873
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             weekday = None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2752
 * 
 *     cdef readonly:
 *         object weekday  # int or None             # <<<<<<<<<<<<<<
 *         int _period_dtype_code
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_7weekday_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_7weekday_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_7weekday___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_7weekday___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->weekday);
  __pyx_r = __pyx_v_self->weekday;
  goto __pyx_L0;

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

/* "pandas/_libs/tslibs/offsets.pyx":2753
 *     cdef readonly:
 *         object weekday  # int or None
 *         int _period_dtype_code             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, weekday=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_18_period_dtype_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_18_period_dtype_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_18_period_dtype_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_4Week_18_period_dtype_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_period_dtype_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Week._period_dtype_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2912
 *     _attributes = tuple(["n", "normalize", "week", "weekday"])
 * 
 *     def __init__(self, n=1, normalize=False, week=0, weekday=0):             # <<<<<<<<<<<<<<
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)
 *         self.week = week
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_week = 0;
  PyObject *__pyx_v_weekday = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_week,&__pyx_n_s_weekday,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_week);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2912, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_week = values[2];
    __pyx_v_weekday = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2912, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_week, __pyx_v_weekday);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_week, PyObject *__pyx_v_weekday) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2913
 * 
 *     def __init__(self, n=1, normalize=False, week=0, weekday=0):
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)             # <<<<<<<<<<<<<<
 *         self.week = week
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2913, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2913, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_weekday);
    __Pyx_GIVEREF(__pyx_v_weekday);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_weekday);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2914
 *     def __init__(self, n=1, normalize=False, week=0, weekday=0):
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)
 *         self.week = week             # <<<<<<<<<<<<<<
 * 
 *         if self.week < 0 or self.week > 3:
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_week); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2914, __pyx_L1_error)
  __pyx_v_self->__pyx_base.week = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":2916
 *         self.week = week
 * 
 *         if self.week < 0 or self.week > 3:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Week must be 0<=week<=3, got {self.week}")
 * 
 */
  __pyx_t_7 = ((__pyx_v_self->__pyx_base.week < 0) != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = ((__pyx_v_self->__pyx_base.week > 3) != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2917
 * 
 *         if self.week < 0 or self.week > 3:
 *             raise ValueError(f"Week must be 0<=week<=3, got {self.week}")             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
    __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_self->__pyx_base.week, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Week_must_be_0_week_3_got, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2917, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2916
 *         self.week = week
 * 
 *         if self.week < 0 or self.week > 3:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Week must be 0<=week<=3, got {self.week}")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2912
 *     _attributes = tuple(["n", "normalize", "week", "weekday"])
 * 
 *     def __init__(self, n=1, normalize=False, week=0, weekday=0):             # <<<<<<<<<<<<<<
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)
 *         self.week = week
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2919
 *             raise ValueError(f"Week must be 0<=week<=3, got {self.week}")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2919, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2920
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2921
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self.weekday = state.pop("weekday")
 *         self.week = state.pop("week")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2922
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")             # <<<<<<<<<<<<<<
 *         self.week = state.pop("week")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_weekday) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_weekday);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.weekday = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2923
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 *         self.week = state.pop("week")             # <<<<<<<<<<<<<<
 * 
 *     def _get_offset_day(self, other: datetime) -> int:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_week) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_week);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.week = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2919
 *             raise ValueError(f"Week must be 0<=week<=3, got {self.week}")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2925
 *         self.week = state.pop("week")
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Find the day in the same month as other that has the same
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_5_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_4_get_offset_day[] = "\n        Find the day in the same month as other that has the same\n        weekday as self.weekday and is the self.week'th such day in the month.\n\n        Parameters\n        ----------\n        other : datetime\n\n        Returns\n        -------\n        day : int\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_5_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_offset_day (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2925, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_4_get_offset_day(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_4_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyDateTime_DateTime *__pyx_v_mstart = NULL;
  PyObject *__pyx_v_wday = NULL;
  PyObject *__pyx_v_shift_days = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_offset_day", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2938
 *         day : int
 *         """
 *         mstart = datetime(other.year, other.month, 1)             # <<<<<<<<<<<<<<
 *         wday = mstart.weekday()
 *         shift_days = (self.weekday - wday) % 7
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_mstart = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2939
 *         """
 *         mstart = datetime(other.year, other.month, 1)
 *         wday = mstart.weekday()             # <<<<<<<<<<<<<<
 *         shift_days = (self.weekday - wday) % 7
 *         return 1 + shift_days + self.week * 7
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mstart), __pyx_n_s_weekday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_wday = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2940
 *         mstart = datetime(other.year, other.month, 1)
 *         wday = mstart.weekday()
 *         shift_days = (self.weekday - wday) % 7             # <<<<<<<<<<<<<<
 *         return 1 + shift_days + self.week * 7
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_wday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_t_3, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_shift_days = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2941
 *         wday = mstart.weekday()
 *         shift_days = (self.weekday - wday) % 7
 *         return 1 + shift_days + self.week * 7             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_v_shift_days, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_v_self->__pyx_base.week * 7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2925
 *         self.week = state.pop("week")
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Find the day in the same month as other that has the same
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth._get_offset_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_mstart);
  __Pyx_XDECREF(__pyx_v_wday);
  __Pyx_XDECREF(__pyx_v_shift_days);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2944
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_7_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_7_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 2944, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2944, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_6_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_6_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  PyObject *__pyx_v_week = NULL;
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2945
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         if not suffix:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         # only one digit weeks (1 --> week 0, 2 --> week 1, etc.)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_suffix); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2945, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2946
 *     def _from_name(cls, suffix=None):
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")             # <<<<<<<<<<<<<<
 *         # only one digit weeks (1 --> week 0, 2 --> week 1, etc.)
 *         week = int(suffix[0]) - 1
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_Prefix);
    __pyx_t_4 += 7;
    __Pyx_GIVEREF(__pyx_kp_u_Prefix);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Prefix);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_prefix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_Repr(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_requires_a_suffix);
    __pyx_t_4 += 19;
    __Pyx_GIVEREF(__pyx_kp_u_requires_a_suffix);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_requires_a_suffix);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2946, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2945
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         if not suffix:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         # only one digit weeks (1 --> week 0, 2 --> week 1, etc.)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2948
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         # only one digit weeks (1 --> week 0, 2 --> week 1, etc.)
 *         week = int(suffix[0]) - 1             # <<<<<<<<<<<<<<
 *         weekday = weekday_to_int[suffix[1:]]
 *         return cls(week=week, weekday=weekday)
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_suffix, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_week = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2949
 *         # only one digit weeks (1 --> week 0, 2 --> week 1, etc.)
 *         week = int(suffix[0]) - 1
 *         weekday = weekday_to_int[suffix[1:]]             # <<<<<<<<<<<<<<
 *         return cls(week=week, weekday=weekday)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_weekday_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_suffix, 1, 0, NULL, NULL, &__pyx_slice__53, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_weekday = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2950
 *         week = int(suffix[0]) - 1
 *         weekday = weekday_to_int[suffix[1:]]
 *         return cls(week=week, weekday=weekday)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_week, __pyx_v_week) < 0) __PYX_ERR(0, 2950, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_weekday, __pyx_v_weekday) < 0) __PYX_ERR(0, 2950, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2944
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.WeekOfMonth._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_week);
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2983
 *     _attributes = tuple(["n", "normalize", "weekday"])
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):             # <<<<<<<<<<<<<<
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)
 *         self.week = -1
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekday = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekday,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2983, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekday = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2983, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday);

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":2984
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)             # <<<<<<<<<<<<<<
 *         self.week = -1
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_weekday);
    __Pyx_GIVEREF(__pyx_v_weekday);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_weekday);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2985
 *     def __init__(self, n=1, normalize=False, weekday=0):
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)
 *         self.week = -1             # <<<<<<<<<<<<<<
 * 
 *         if self.n == 0:
 */
  __pyx_v_self->__pyx_base.week = -1;

  /* "pandas/_libs/tslibs/offsets.pyx":2987
 *         self.week = -1
 * 
 *         if self.n == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("N cannot be 0")
 * 
 */
  __pyx_t_6 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n == 0) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":2988
 * 
 *         if self.n == 0:
 *             raise ValueError("N cannot be 0")             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2988, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":2987
 *         self.week = -1
 * 
 *         if self.n == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("N cannot be 0")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2983
 *     _attributes = tuple(["n", "normalize", "weekday"])
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):             # <<<<<<<<<<<<<<
 *         WeekOfMonthMixin.__init__(self, n, normalize, weekday)
 *         self.week = -1
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2990
 *             raise ValueError("N cannot be 0")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2990, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":2991
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":2992
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self.weekday = state.pop("weekday")
 *         self.week = -1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":2993
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")             # <<<<<<<<<<<<<<
 *         self.week = -1
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_weekday) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_weekday);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.weekday = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":2994
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 *         self.week = -1             # <<<<<<<<<<<<<<
 * 
 *     def _get_offset_day(self, other: datetime) -> int:
 */
  __pyx_v_self->__pyx_base.week = -1;

  /* "pandas/_libs/tslibs/offsets.pyx":2990
 *             raise ValueError("N cannot be 0")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":2996
 *         self.week = -1
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Find the day in the same month as other that has the same
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_5_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_4_get_offset_day[] = "\n        Find the day in the same month as other that has the same\n        weekday as self.weekday and is the last such day in the month.\n\n        Parameters\n        ----------\n        other: datetime\n\n        Returns\n        -------\n        day: int\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_5_get_offset_day(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_offset_day (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 2996, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_4_get_offset_day(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_4_get_offset_day(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_dim = NULL;
  PyDateTime_DateTime *__pyx_v_mend = NULL;
  PyObject *__pyx_v_wday = NULL;
  PyObject *__pyx_v_shift_days = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_offset_day", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3009
 *         day: int
 *         """
 *         dim = get_days_in_month(other.year, other.month)             # <<<<<<<<<<<<<<
 *         mend = datetime(other.year, other.month, dim)
 *         wday = mend.weekday()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_t_2, __pyx_t_3, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dim = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3010
 *         """
 *         dim = get_days_in_month(other.year, other.month)
 *         mend = datetime(other.year, other.month, dim)             # <<<<<<<<<<<<<<
 *         wday = mend.weekday()
 *         shift_days = (wday - self.weekday) % 7
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_dim);
  __Pyx_GIVEREF(__pyx_v_dim);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_dim);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_mend = ((PyDateTime_DateTime *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3011
 *         dim = get_days_in_month(other.year, other.month)
 *         mend = datetime(other.year, other.month, dim)
 *         wday = mend.weekday()             # <<<<<<<<<<<<<<
 *         shift_days = (wday - self.weekday) % 7
 *         return dim - shift_days
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mend), __pyx_n_s_weekday); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_wday = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3012
 *         mend = datetime(other.year, other.month, dim)
 *         wday = mend.weekday()
 *         shift_days = (wday - self.weekday) % 7             # <<<<<<<<<<<<<<
 *         return dim - shift_days
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.weekday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Subtract(__pyx_v_wday, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_RemainderObjC(__pyx_t_5, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_shift_days = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3013
 *         wday = mend.weekday()
 *         shift_days = (wday - self.weekday) % 7
 *         return dim - shift_days             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyNumber_Subtract(__pyx_v_dim, __pyx_v_shift_days); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":2996
 *         self.week = -1
 * 
 *     def _get_offset_day(self, other: datetime) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Find the day in the same month as other that has the same
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth._get_offset_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF((PyObject *)__pyx_v_mend);
  __Pyx_XDECREF(__pyx_v_wday);
  __Pyx_XDECREF(__pyx_v_shift_days);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3016
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_7_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_7_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_suffix = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_suffix,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_name") < 0)) __PYX_ERR(0, 3016, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_suffix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_name", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3016, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_6_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_suffix);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_6_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_suffix) {
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3017
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         if not suffix:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         weekday = weekday_to_int[suffix]
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_suffix); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3018
 *     def _from_name(cls, suffix=None):
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")             # <<<<<<<<<<<<<<
 *         weekday = weekday_to_int[suffix]
 *         return cls(weekday=weekday)
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_Prefix);
    __pyx_t_4 += 7;
    __Pyx_GIVEREF(__pyx_kp_u_Prefix);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Prefix);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_prefix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_Repr(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_requires_a_suffix);
    __pyx_t_4 += 19;
    __Pyx_GIVEREF(__pyx_kp_u_requires_a_suffix);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_requires_a_suffix);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3018, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3017
 *     @classmethod
 *     def _from_name(cls, suffix=None):
 *         if not suffix:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         weekday = weekday_to_int[suffix]
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3019
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         weekday = weekday_to_int[suffix]             # <<<<<<<<<<<<<<
 *         return cls(weekday=weekday)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_weekday_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_suffix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_weekday = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3020
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 *         weekday = weekday_to_int[suffix]
 *         return cls(weekday=weekday)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_weekday, __pyx_v_weekday) < 0) __PYX_ERR(0, 3020, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3016
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.LastWeekOfMonth._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3032
 *         str variation
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self, n=1, normalize=False, weekday=0, startingMonth=1, variation="nearest"
 *     ):
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekday = 0;
  PyObject *__pyx_v_startingMonth = 0;
  PyObject *__pyx_v_variation = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekday,&__pyx_n_s_startingMonth,&__pyx_n_s_variation,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);

    /* "pandas/_libs/tslibs/offsets.pyx":3033
 * 
 *     def __init__(
 *         self, n=1, normalize=False, weekday=0, startingMonth=1, variation="nearest"             # <<<<<<<<<<<<<<
 *     ):
 *         BaseOffset.__init__(self, n, normalize)
 */
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)__pyx_int_1);
    values[4] = ((PyObject *)__pyx_n_u_nearest);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startingMonth);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variation);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3032, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekday = values[2];
    __pyx_v_startingMonth = values[3];
    __pyx_v_variation = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3032, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday, __pyx_v_startingMonth, __pyx_v_variation);

  /* "pandas/_libs/tslibs/offsets.pyx":3032
 *         str variation
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self, n=1, normalize=False, weekday=0, startingMonth=1, variation="nearest"
 *     ):
 */

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday, PyObject *__pyx_v_startingMonth, PyObject *__pyx_v_variation) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3035
 *         self, n=1, normalize=False, weekday=0, startingMonth=1, variation="nearest"
 *     ):
 *         BaseOffset.__init__(self, n, normalize)             # <<<<<<<<<<<<<<
 *         self.startingMonth = startingMonth
 *         self.weekday = weekday
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3035, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3035, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3036
 *     ):
 *         BaseOffset.__init__(self, n, normalize)
 *         self.startingMonth = startingMonth             # <<<<<<<<<<<<<<
 *         self.weekday = weekday
 *         self.variation = variation
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_startingMonth); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3036, __pyx_L1_error)
  __pyx_v_self->startingMonth = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":3037
 *         BaseOffset.__init__(self, n, normalize)
 *         self.startingMonth = startingMonth
 *         self.weekday = weekday             # <<<<<<<<<<<<<<
 *         self.variation = variation
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_weekday); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3037, __pyx_L1_error)
  __pyx_v_self->weekday = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":3038
 *         self.startingMonth = startingMonth
 *         self.weekday = weekday
 *         self.variation = variation             # <<<<<<<<<<<<<<
 * 
 *         if self.n == 0:
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_variation))||((__pyx_v_variation) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_variation)->tp_name), 0))) __PYX_ERR(0, 3038, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_variation;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->variation);
  __Pyx_DECREF(__pyx_v_self->variation);
  __pyx_v_self->variation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3040
 *         self.variation = variation
 * 
 *         if self.n == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("N cannot be 0")
 * 
 */
  __pyx_t_6 = ((__pyx_v_self->__pyx_base.__pyx_base.n == 0) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3041
 * 
 *         if self.n == 0:
 *             raise ValueError("N cannot be 0")             # <<<<<<<<<<<<<<
 * 
 *         if self.variation not in ["nearest", "last"]:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3041, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3040
 *         self.variation = variation
 * 
 *         if self.n == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("N cannot be 0")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3043
 *             raise ValueError("N cannot be 0")
 * 
 *         if self.variation not in ["nearest", "last"]:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"{self.variation} is not a valid variation")
 * 
 */
  __Pyx_INCREF(__pyx_v_self->variation);
  __pyx_t_7 = __pyx_v_self->variation;
  __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_nearest, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {
  } else {
    __pyx_t_6 = __pyx_t_9;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_last, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_9 != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (unlikely(__pyx_t_8)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3044
 * 
 *         if self.variation not in ["nearest", "last"]:
 *             raise ValueError(f"{self.variation} is not a valid variation")             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
    __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_self->variation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_is_not_a_valid_variation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3044, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3043
 *             raise ValueError("N cannot be 0")
 * 
 *         if self.variation not in ["nearest", "last"]:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"{self.variation} is not a valid variation")
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3032
 *         str variation
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self, n=1, normalize=False, weekday=0, startingMonth=1, variation="nearest"
 *     ):
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3046
 *             raise ValueError(f"{self.variation} is not a valid variation")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3047
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":3048
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 *         self.weekday = state.pop("weekday")
 *         self.variation = state.pop("variation")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":3049
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")             # <<<<<<<<<<<<<<
 *         self.variation = state.pop("variation")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_weekday) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_weekday);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->weekday = __pyx_t_7;

  /* "pandas/_libs/tslibs/offsets.pyx":3050
 *         self.normalize = state.pop("normalize")
 *         self.weekday = state.pop("weekday")
 *         self.variation = state.pop("variation")             # <<<<<<<<<<<<<<
 * 
 *     def is_anchored(self) -> bool:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_variation) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_variation);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 3050, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->variation);
  __Pyx_DECREF(__pyx_v_self->variation);
  __pyx_v_self->variation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3046
 *             raise ValueError(f"{self.variation} is not a valid variation")
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3052
 *         self.variation = state.pop("variation")
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return (
 *             self.n == 1 and self.startingMonth is not None and self.weekday is not None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_5is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_5is_anchored(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_anchored (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_4is_anchored(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":3053
 * 
 *     def is_anchored(self) -> bool:
 *         return (             # <<<<<<<<<<<<<<
 *             self.n == 1 and self.startingMonth is not None and self.weekday is not None
 *         )
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/_libs/tslibs/offsets.pyx":3054
 *     def is_anchored(self) -> bool:
 *         return (
 *             self.n == 1 and self.startingMonth is not None and self.weekday is not None             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.n == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->startingMonth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->weekday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3052
 *         self.variation = state.pop("variation")
 * 
 *     def is_anchored(self) -> bool:             # <<<<<<<<<<<<<<
 *         return (
 *             self.n == 1 and self.startingMonth is not None and self.weekday is not None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.is_anchored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3061
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         prefix = self._prefix
 *         suffix = self.get_rule_code_suffix()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self) {
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_suffix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3062
 *     @property
 *     def rule_code(self) -> str:
 *         prefix = self._prefix             # <<<<<<<<<<<<<<
 *         suffix = self.get_rule_code_suffix()
 *         return f"{prefix}-{suffix}"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prefix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3063
 *     def rule_code(self) -> str:
 *         prefix = self._prefix
 *         suffix = self.get_rule_code_suffix()             # <<<<<<<<<<<<<<
 *         return f"{prefix}-{suffix}"
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_rule_code_suffix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_suffix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3064
 *         prefix = self._prefix
 *         suffix = self.get_rule_code_suffix()
 *         return f"{prefix}-{suffix}"             # <<<<<<<<<<<<<<
 * 
 *     def _get_suffix_prefix(self) -> str:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_prefix, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__39);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_suffix, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3061
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         prefix = self._prefix
 *         suffix = self.get_rule_code_suffix()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_suffix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3066
 *         return f"{prefix}-{suffix}"
 * 
 *     def _get_suffix_prefix(self) -> str:             # <<<<<<<<<<<<<<
 *         if self.variation == "nearest":
 *             return "N"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7_get_suffix_prefix(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7_get_suffix_prefix(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_suffix_prefix (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_6_get_suffix_prefix(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":3067
 * 
 *     def _get_suffix_prefix(self) -> str:
 *         if self.variation == "nearest":             # <<<<<<<<<<<<<<
 *             return "N"
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->variation, __pyx_n_u_nearest, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":3068
 *     def _get_suffix_prefix(self) -> str:
 *         if self.variation == "nearest":
 *             return "N"             # <<<<<<<<<<<<<<
 *         else:
 *             return "L"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_u_N);
    __pyx_r = __pyx_n_u_N;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3067
 * 
 *     def _get_suffix_prefix(self) -> str:
 *         if self.variation == "nearest":             # <<<<<<<<<<<<<<
 *             return "N"
 *         else:
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3070
 *             return "N"
 *         else:
 *             return "L"             # <<<<<<<<<<<<<<
 * 
 *     def get_rule_code_suffix(self) -> str:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_u_L);
    __pyx_r = __pyx_n_u_L;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3066
 *         return f"{prefix}-{suffix}"
 * 
 *     def _get_suffix_prefix(self) -> str:             # <<<<<<<<<<<<<<
 *         if self.variation == "nearest":
 *             return "N"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin._get_suffix_prefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3072
 *             return "L"
 * 
 *     def get_rule_code_suffix(self) -> str:             # <<<<<<<<<<<<<<
 *         prefix = self._get_suffix_prefix()
 *         month = MONTH_ALIASES[self.startingMonth]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9get_rule_code_suffix(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9get_rule_code_suffix(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_rule_code_suffix (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_8get_rule_code_suffix(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_8get_rule_code_suffix(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self) {
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_month = NULL;
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_rule_code_suffix", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3073
 * 
 *     def get_rule_code_suffix(self) -> str:
 *         prefix = self._get_suffix_prefix()             # <<<<<<<<<<<<<<
 *         month = MONTH_ALIASES[self.startingMonth]
 *         weekday = int_to_weekday[self.weekday]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_suffix_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_prefix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3074
 *     def get_rule_code_suffix(self) -> str:
 *         prefix = self._get_suffix_prefix()
 *         month = MONTH_ALIASES[self.startingMonth]             # <<<<<<<<<<<<<<
 *         weekday = int_to_weekday[self.weekday]
 *         return f"{prefix}-{month}-{weekday}"
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MONTH_ALIASES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->startingMonth, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_month = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3075
 *         prefix = self._get_suffix_prefix()
 *         month = MONTH_ALIASES[self.startingMonth]
 *         weekday = int_to_weekday[self.weekday]             # <<<<<<<<<<<<<<
 *         return f"{prefix}-{month}-{weekday}"
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_int_to_weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_self->weekday, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_weekday = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3076
 *         month = MONTH_ALIASES[self.startingMonth]
 *         weekday = int_to_weekday[self.weekday]
 *         return f"{prefix}-{month}-{weekday}"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_prefix, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__39);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_month, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__39);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_weekday, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3072
 *             return "L"
 * 
 *     def get_rule_code_suffix(self) -> str:             # <<<<<<<<<<<<<<
 *         prefix = self._get_suffix_prefix()
 *         month = MONTH_ALIASES[self.startingMonth]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.get_rule_code_suffix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_month);
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3028
 * cdef class FY5253Mixin(SingleConstructorOffset):
 *     cdef readonly:
 *         int startingMonth             # <<<<<<<<<<<<<<
 *         int weekday
 *         str variation
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_13startingMonth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_13startingMonth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_13startingMonth___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_13startingMonth___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->startingMonth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.startingMonth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3029
 *     cdef readonly:
 *         int startingMonth
 *         int weekday             # <<<<<<<<<<<<<<
 *         str variation
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7weekday_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7weekday_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7weekday___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7weekday___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Mixin.weekday.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3030
 *         int startingMonth
 *         int weekday
 *         str variation             # <<<<<<<<<<<<<<
 * 
 *     def __init__(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9variation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9variation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9variation___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9variation___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->variation);
  __pyx_r = __pyx_v_self->variation;
  goto __pyx_L0;

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

/* "pandas/_libs/tslibs/offsets.pyx":3136
 *     _attributes = tuple(["n", "normalize", "weekday", "startingMonth", "variation"])
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_1is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3136, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_year_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "pandas/_libs/tslibs/offsets.pyx":3137
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         dt = datetime(dt.year, dt.month, dt.day)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3138
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         dt = datetime(dt.year, dt.month, dt.day)
 *         year_end = self.get_year_end(dt)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3137
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         dt = datetime(dt.year, dt.month, dt.day)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3139
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         dt = datetime(dt.year, dt.month, dt.day)             # <<<<<<<<<<<<<<
 *         year_end = self.get_year_end(dt)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_5));
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3140
 *             return False
 *         dt = datetime(dt.year, dt.month, dt.day)
 *         year_end = self.get_year_end(dt)             # <<<<<<<<<<<<<<
 * 
 *         if self.variation == "nearest":
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_year_end); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_year_end = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3142
 *         year_end = self.get_year_end(dt)
 * 
 *         if self.variation == "nearest":             # <<<<<<<<<<<<<<
 *             # We have to check the year end of "this" cal year AND the previous
 *             return year_end == dt or self.get_year_end(shift_month(dt, -1, None)) == dt
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->__pyx_base.variation, __pyx_n_u_nearest, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":3144
 *         if self.variation == "nearest":
 *             # We have to check the year end of "this" cal year AND the previous
 *             return year_end == dt or self.get_year_end(shift_month(dt, -1, None)) == dt             # <<<<<<<<<<<<<<
 *         else:
 *             return year_end == dt
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_year_end, ((PyObject *)__pyx_v_dt), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3144, __pyx_L1_error)
    if (!__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_year_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_shift_month); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_8, ((PyObject *)__pyx_v_dt), __pyx_int_neg_1, Py_None};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_8, ((PyObject *)__pyx_v_dt), __pyx_int_neg_1, Py_None};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_dt));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, ((PyObject *)__pyx_v_dt));
      __Pyx_INCREF(__pyx_int_neg_1);
      __Pyx_GIVEREF(__pyx_int_neg_1);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_int_neg_1);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, Py_None);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_v_dt), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_L7_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3142
 *         year_end = self.get_year_end(dt)
 * 
 *         if self.variation == "nearest":             # <<<<<<<<<<<<<<
 *             # We have to check the year end of "this" cal year AND the previous
 *             return year_end == dt or self.get_year_end(shift_month(dt, -1, None)) == dt
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3146
 *             return year_end == dt or self.get_year_end(shift_month(dt, -1, None)) == dt
 *         else:
 *             return year_end == dt             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_year_end, ((PyObject *)__pyx_v_dt), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3146, __pyx_L1_error)
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3136
 *     _attributes = tuple(["n", "normalize", "weekday", "startingMonth", "variation"])
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_year_end);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3149
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         norm = Timestamp(other).normalize()
 * 
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 3149, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_2_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_norm = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_prev_year = NULL;
  PyObject *__pyx_v_cur_year = NULL;
  PyObject *__pyx_v_next_year = NULL;
  PyDateTime_DateTime *__pyx_v_shifted = NULL;
  PyObject *__pyx_v_result = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3150
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         norm = Timestamp(other).normalize()             # <<<<<<<<<<<<<<
 * 
 *         n = self.n
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_norm = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3152
 *         norm = Timestamp(other).normalize()
 * 
 *         n = self.n             # <<<<<<<<<<<<<<
 *         prev_year = self.get_year_end(datetime(other.year - 1, self.startingMonth, 1))
 *         cur_year = self.get_year_end(datetime(other.year, self.startingMonth, 1))
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3153
 * 
 *         n = self.n
 *         prev_year = self.get_year_end(datetime(other.year - 1, self.startingMonth, 1))             # <<<<<<<<<<<<<<
 *         cur_year = self.get_year_end(datetime(other.year, self.startingMonth, 1))
 *         next_year = self.get_year_end(datetime(other.year + 1, self.startingMonth, 1))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_year_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.startingMonth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_prev_year = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3154
 *         n = self.n
 *         prev_year = self.get_year_end(datetime(other.year - 1, self.startingMonth, 1))
 *         cur_year = self.get_year_end(datetime(other.year, self.startingMonth, 1))             # <<<<<<<<<<<<<<
 *         next_year = self.get_year_end(datetime(other.year + 1, self.startingMonth, 1))
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_year_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.startingMonth); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __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(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cur_year = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3155
 *         prev_year = self.get_year_end(datetime(other.year - 1, self.startingMonth, 1))
 *         cur_year = self.get_year_end(datetime(other.year, self.startingMonth, 1))
 *         next_year = self.get_year_end(datetime(other.year + 1, self.startingMonth, 1))             # <<<<<<<<<<<<<<
 * 
 *         prev_year = localize_pydatetime(prev_year, other.tzinfo)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_year_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.startingMonth); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_next_year = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3157
 *         next_year = self.get_year_end(datetime(other.year + 1, self.startingMonth, 1))
 * 
 *         prev_year = localize_pydatetime(prev_year, other.tzinfo)             # <<<<<<<<<<<<<<
 *         cur_year = localize_pydatetime(cur_year, other.tzinfo)
 *         next_year = localize_pydatetime(next_year, other.tzinfo)
 */
  if (!(likely(((__pyx_v_prev_year) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_prev_year, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3157, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_tzinfo))))) __PYX_ERR(0, 3157, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime(((PyDateTime_DateTime *)__pyx_v_prev_year), ((PyDateTime_TZInfo *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_prev_year, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3158
 * 
 *         prev_year = localize_pydatetime(prev_year, other.tzinfo)
 *         cur_year = localize_pydatetime(cur_year, other.tzinfo)             # <<<<<<<<<<<<<<
 *         next_year = localize_pydatetime(next_year, other.tzinfo)
 * 
 */
  if (!(likely(((__pyx_v_cur_year) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_cur_year, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3158, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7cpython_8datetime_tzinfo))))) __PYX_ERR(0, 3158, __pyx_L1_error)
  __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime(((PyDateTime_DateTime *)__pyx_v_cur_year), ((PyDateTime_TZInfo *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_cur_year, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3159
 *         prev_year = localize_pydatetime(prev_year, other.tzinfo)
 *         cur_year = localize_pydatetime(cur_year, other.tzinfo)
 *         next_year = localize_pydatetime(next_year, other.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         # Note: next_year.year == other.year + 1, so we will always
 */
  if (!(likely(((__pyx_v_next_year) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_next_year, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3159, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_tzinfo))))) __PYX_ERR(0, 3159, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime(((PyDateTime_DateTime *)__pyx_v_next_year), ((PyDateTime_TZInfo *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_next_year, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3163
 *         # Note: next_year.year == other.year + 1, so we will always
 *         # have other < next_year
 *         if norm == prev_year:             # <<<<<<<<<<<<<<
 *             n -= 1
 *         elif norm == cur_year:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_prev_year, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3163, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":3164
 *         # have other < next_year
 *         if norm == prev_year:
 *             n -= 1             # <<<<<<<<<<<<<<
 *         elif norm == cur_year:
 *             pass
 */
    __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3163
 *         # Note: next_year.year == other.year + 1, so we will always
 *         # have other < next_year
 *         if norm == prev_year:             # <<<<<<<<<<<<<<
 *             n -= 1
 *         elif norm == cur_year:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3165
 *         if norm == prev_year:
 *             n -= 1
 *         elif norm == cur_year:             # <<<<<<<<<<<<<<
 *             pass
 *         elif n > 0:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_cur_year, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3167
 *         elif norm == cur_year:
 *             pass
 *         elif n > 0:             # <<<<<<<<<<<<<<
 *             if norm < prev_year:
 *                 n -= 2
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3167, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":3168
 *             pass
 *         elif n > 0:
 *             if norm < prev_year:             # <<<<<<<<<<<<<<
 *                 n -= 2
 *             elif prev_year < norm < cur_year:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_prev_year, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3168, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_6) {

      /* "pandas/_libs/tslibs/offsets.pyx":3169
 *         elif n > 0:
 *             if norm < prev_year:
 *                 n -= 2             # <<<<<<<<<<<<<<
 *             elif prev_year < norm < cur_year:
 *                 n -= 1
 */
      __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_2, 2, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3168
 *             pass
 *         elif n > 0:
 *             if norm < prev_year:             # <<<<<<<<<<<<<<
 *                 n -= 2
 *             elif prev_year < norm < cur_year:
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3170
 *             if norm < prev_year:
 *                 n -= 2
 *             elif prev_year < norm < cur_year:             # <<<<<<<<<<<<<<
 *                 n -= 1
 *             elif cur_year < norm < next_year:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_prev_year, __pyx_v_norm, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3170, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_3)) {
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_cur_year, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3170, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3170, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_6) {

      /* "pandas/_libs/tslibs/offsets.pyx":3171
 *                 n -= 2
 *             elif prev_year < norm < cur_year:
 *                 n -= 1             # <<<<<<<<<<<<<<
 *             elif cur_year < norm < next_year:
 *                 pass
 */
      __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3170
 *             if norm < prev_year:
 *                 n -= 2
 *             elif prev_year < norm < cur_year:             # <<<<<<<<<<<<<<
 *                 n -= 1
 *             elif cur_year < norm < next_year:
 */
      goto __pyx_L4;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3172
 *             elif prev_year < norm < cur_year:
 *                 n -= 1
 *             elif cur_year < norm < next_year:             # <<<<<<<<<<<<<<
 *                 pass
 *         else:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_cur_year, __pyx_v_norm, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_3)) {
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_next_year, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_6) {
    }
    __pyx_L4:;

    /* "pandas/_libs/tslibs/offsets.pyx":3167
 *         elif norm == cur_year:
 *             pass
 *         elif n > 0:             # <<<<<<<<<<<<<<
 *             if norm < prev_year:
 *                 n -= 2
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3175
 *                 pass
 *         else:
 *             if cur_year < norm < next_year:             # <<<<<<<<<<<<<<
 *                 n += 1
 *             elif prev_year < norm < cur_year:
 */
  /*else*/ {
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_cur_year, __pyx_v_norm, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_3)) {
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_next_year, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_6) {

      /* "pandas/_libs/tslibs/offsets.pyx":3176
 *         else:
 *             if cur_year < norm < next_year:
 *                 n += 1             # <<<<<<<<<<<<<<
 *             elif prev_year < norm < cur_year:
 *                 pass
 */
      __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3175
 *                 pass
 *         else:
 *             if cur_year < norm < next_year:             # <<<<<<<<<<<<<<
 *                 n += 1
 *             elif prev_year < norm < cur_year:
 */
      goto __pyx_L5;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3177
 *             if cur_year < norm < next_year:
 *                 n += 1
 *             elif prev_year < norm < cur_year:             # <<<<<<<<<<<<<<
 *                 pass
 *             elif (
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_prev_year, __pyx_v_norm, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3177, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_3)) {
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_cur_year, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3177, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3177, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_6) {
      goto __pyx_L5;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3180
 *                 pass
 *             elif (
 *                 norm.year == prev_year.year             # <<<<<<<<<<<<<<
 *                 and norm < prev_year
 *                 and prev_year - norm <= timedelta(6)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_norm, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev_year, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L6_bool_binop_done;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3181
 *             elif (
 *                 norm.year == prev_year.year
 *                 and norm < prev_year             # <<<<<<<<<<<<<<
 *                 and prev_year - norm <= timedelta(6)
 *             ):
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_norm, __pyx_v_prev_year, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3181, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L6_bool_binop_done;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3182
 *                 norm.year == prev_year.year
 *                 and norm < prev_year
 *                 and prev_year - norm <= timedelta(6)             # <<<<<<<<<<<<<<
 *             ):
 *                 # GH#14774, error when next_year.year == cur_year.year
 */
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_prev_year, __pyx_v_norm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;

    /* "pandas/_libs/tslibs/offsets.pyx":3179
 *             elif prev_year < norm < cur_year:
 *                 pass
 *             elif (             # <<<<<<<<<<<<<<
 *                 norm.year == prev_year.year
 *                 and norm < prev_year
 */
    if (__pyx_t_6) {

      /* "pandas/_libs/tslibs/offsets.pyx":3187
 *                 # e.g. prev_year == datetime(2004, 1, 3),
 *                 # other == datetime(2004, 1, 1)
 *                 n -= 1             # <<<<<<<<<<<<<<
 *             else:
 *                 assert False
 */
      __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3179
 *             elif prev_year < norm < cur_year:
 *                 pass
 *             elif (             # <<<<<<<<<<<<<<
 *                 norm.year == prev_year.year
 *                 and norm < prev_year
 */
      goto __pyx_L5;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3189
 *                 n -= 1
 *             else:
 *                 assert False             # <<<<<<<<<<<<<<
 * 
 *         shifted = datetime(other.year + n, self.startingMonth, 1)
 */
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!0)) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 3189, __pyx_L1_error)
        }
      }
      #endif
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3191
 *                 assert False
 * 
 *         shifted = datetime(other.year + n, self.startingMonth, 1)             # <<<<<<<<<<<<<<
 *         result = self.get_year_end(shifted)
 *         result = datetime(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.startingMonth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_shifted = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3192
 * 
 *         shifted = datetime(other.year + n, self.startingMonth, 1)
 *         result = self.get_year_end(shifted)             # <<<<<<<<<<<<<<
 *         result = datetime(
 *             result.year,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_year_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_v_shifted)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_shifted));
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3194
 *         result = self.get_year_end(shifted)
 *         result = datetime(
 *             result.year,             # <<<<<<<<<<<<<<
 *             result.month,
 *             result.day,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pandas/_libs/tslibs/offsets.pyx":3195
 *         result = datetime(
 *             result.year,
 *             result.month,             # <<<<<<<<<<<<<<
 *             result.day,
 *             other.hour,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pandas/_libs/tslibs/offsets.pyx":3196
 *             result.year,
 *             result.month,
 *             result.day,             # <<<<<<<<<<<<<<
 *             other.hour,
 *             other.minute,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":3197
 *             result.month,
 *             result.day,
 *             other.hour,             # <<<<<<<<<<<<<<
 *             other.minute,
 *             other.second,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":3198
 *             result.day,
 *             other.hour,
 *             other.minute,             # <<<<<<<<<<<<<<
 *             other.second,
 *             other.microsecond,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_minute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3199
 *             other.hour,
 *             other.minute,
 *             other.second,             # <<<<<<<<<<<<<<
 *             other.microsecond,
 *         )
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_second); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "pandas/_libs/tslibs/offsets.pyx":3200
 *             other.minute,
 *             other.second,
 *             other.microsecond,             # <<<<<<<<<<<<<<
 *         )
 *         return result
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_microsecond); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "pandas/_libs/tslibs/offsets.pyx":3193
 *         shifted = datetime(other.year + n, self.startingMonth, 1)
 *         result = self.get_year_end(shifted)
 *         result = datetime(             # <<<<<<<<<<<<<<
 *             result.year,
 *             result.month,
 */
  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3202
 *             other.microsecond,
 *         )
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_year_end(self, dt: datetime) -> datetime:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_7cpython_8datetime_datetime)))) __PYX_ERR(0, 3202, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_v_result);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3149
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         norm = Timestamp(other).normalize()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_norm);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_prev_year);
  __Pyx_XDECREF(__pyx_v_cur_year);
  __Pyx_XDECREF(__pyx_v_next_year);
  __Pyx_XDECREF((PyObject *)__pyx_v_shifted);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3204
 *         return result
 * 
 *     def get_year_end(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         assert dt.tzinfo is None
 * 
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_5get_year_end(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_5get_year_end(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_year_end (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3204, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_4get_year_end(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_4get_year_end(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  __pyx_t_5numpy_int32_t __pyx_v_dim;
  PyDateTime_DateTime *__pyx_v_target_date = NULL;
  PyObject *__pyx_v_wkday_diff = NULL;
  PyObject *__pyx_v_days_forward = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_year_end", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3205
 * 
 *     def get_year_end(self, dt: datetime) -> datetime:
 *         assert dt.tzinfo is None             # <<<<<<<<<<<<<<
 * 
 *         dim = get_days_in_month(dt.year, self.startingMonth)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = (__pyx_t_1 == Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 3205, __pyx_L1_error)
    }
  }
  #endif

  /* "pandas/_libs/tslibs/offsets.pyx":3207
 *         assert dt.tzinfo is None
 * 
 *         dim = get_days_in_month(dt.year, self.startingMonth)             # <<<<<<<<<<<<<<
 *         target_date = datetime(dt.year, self.startingMonth, dim)
 *         wkday_diff = self.weekday - target_date.weekday()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dim = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_t_3, __pyx_v_self->__pyx_base.startingMonth, 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3208
 * 
 *         dim = get_days_in_month(dt.year, self.startingMonth)
 *         target_date = datetime(dt.year, self.startingMonth, dim)             # <<<<<<<<<<<<<<
 *         wkday_diff = self.weekday - target_date.weekday()
 *         if wkday_diff == 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.startingMonth); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_target_date = ((PyDateTime_DateTime *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3209
 *         dim = get_days_in_month(dt.year, self.startingMonth)
 *         target_date = datetime(dt.year, self.startingMonth, dim)
 *         wkday_diff = self.weekday - target_date.weekday()             # <<<<<<<<<<<<<<
 *         if wkday_diff == 0:
 *             # year_end is the same for "last" and "nearest" cases
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.weekday); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target_date), __pyx_n_s_weekday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_wkday_diff = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3210
 *         target_date = datetime(dt.year, self.startingMonth, dim)
 *         wkday_diff = self.weekday - target_date.weekday()
 *         if wkday_diff == 0:             # <<<<<<<<<<<<<<
 *             # year_end is the same for "last" and "nearest" cases
 *             return target_date
 */
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_wkday_diff, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":3212
 *         if wkday_diff == 0:
 *             # year_end is the same for "last" and "nearest" cases
 *             return target_date             # <<<<<<<<<<<<<<
 * 
 *         if self.variation == "last":
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_target_date));
    __pyx_r = __pyx_v_target_date;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3210
 *         target_date = datetime(dt.year, self.startingMonth, dim)
 *         wkday_diff = self.weekday - target_date.weekday()
 *         if wkday_diff == 0:             # <<<<<<<<<<<<<<
 *             # year_end is the same for "last" and "nearest" cases
 *             return target_date
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3214
 *             return target_date
 * 
 *         if self.variation == "last":             # <<<<<<<<<<<<<<
 *             days_forward = (wkday_diff % 7) - 7
 * 
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->__pyx_base.variation, __pyx_n_u_last, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3214, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":3215
 * 
 *         if self.variation == "last":
 *             days_forward = (wkday_diff % 7) - 7             # <<<<<<<<<<<<<<
 * 
 *             # days_forward is always negative, so we always end up
 */
    __pyx_t_4 = __Pyx_PyInt_RemainderObjC(__pyx_v_wkday_diff, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_days_forward = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3219
 *             # days_forward is always negative, so we always end up
 *             # in the same year as dt
 *             return target_date + timedelta(days=days_forward)             # <<<<<<<<<<<<<<
 *         else:
 *             # variation == "nearest":
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_days, __pyx_v_days_forward) < 0) __PYX_ERR(0, 3219, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_v_target_date), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3219, __pyx_L1_error)
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3214
 *             return target_date
 * 
 *         if self.variation == "last":             # <<<<<<<<<<<<<<
 *             days_forward = (wkday_diff % 7) - 7
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3222
 *         else:
 *             # variation == "nearest":
 *             days_forward = wkday_diff % 7             # <<<<<<<<<<<<<<
 *             if days_forward <= 3:
 *                 # The upcoming self.weekday is closer than the previous one
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyInt_RemainderObjC(__pyx_v_wkday_diff, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_days_forward = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3223
 *             # variation == "nearest":
 *             days_forward = wkday_diff % 7
 *             if days_forward <= 3:             # <<<<<<<<<<<<<<
 *                 # The upcoming self.weekday is closer than the previous one
 *                 return target_date + timedelta(days_forward)
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_days_forward, __pyx_int_3, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3223, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_7) {

      /* "pandas/_libs/tslibs/offsets.pyx":3225
 *             if days_forward <= 3:
 *                 # The upcoming self.weekday is closer than the previous one
 *                 return target_date + timedelta(days_forward)             # <<<<<<<<<<<<<<
 *             else:
 *                 # The previous self.weekday is closer than the upcoming one
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_v_days_forward); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_target_date), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3225, __pyx_L1_error)
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":3223
 *             # variation == "nearest":
 *             days_forward = wkday_diff % 7
 *             if days_forward <= 3:             # <<<<<<<<<<<<<<
 *                 # The upcoming self.weekday is closer than the previous one
 *                 return target_date + timedelta(days_forward)
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3228
 *             else:
 *                 # The previous self.weekday is closer than the upcoming one
 *                 return target_date + timedelta(days_forward - 7)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_days_forward, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_target_date), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3228, __pyx_L1_error)
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3204
 *         return result
 * 
 *     def get_year_end(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         assert dt.tzinfo is None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253.get_year_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_target_date);
  __Pyx_XDECREF(__pyx_v_wkday_diff);
  __Pyx_XDECREF(__pyx_v_days_forward);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3231
 * 
 *     @classmethod
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):             # <<<<<<<<<<<<<<
 *         if varion_code == "N":
 *             variation = "nearest"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_7_parse_suffix(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_7_parse_suffix(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_varion_code = 0;
  PyObject *__pyx_v_startingMonth_code = 0;
  PyObject *__pyx_v_weekday_code = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_suffix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varion_code,&__pyx_n_s_startingMonth_code,&__pyx_n_s_weekday_code,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_varion_code)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startingMonth_code)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_suffix", 1, 3, 3, 1); __PYX_ERR(0, 3231, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday_code)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_suffix", 1, 3, 3, 2); __PYX_ERR(0, 3231, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_suffix") < 0)) __PYX_ERR(0, 3231, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_varion_code = values[0];
    __pyx_v_startingMonth_code = values[1];
    __pyx_v_weekday_code = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_parse_suffix", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3231, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253._parse_suffix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_6_parse_suffix(((PyTypeObject*)__pyx_v_cls), __pyx_v_varion_code, __pyx_v_startingMonth_code, __pyx_v_weekday_code);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_6_parse_suffix(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_varion_code, PyObject *__pyx_v_startingMonth_code, PyObject *__pyx_v_weekday_code) {
  PyObject *__pyx_v_variation = NULL;
  PyObject *__pyx_v_startingMonth = NULL;
  PyObject *__pyx_v_weekday = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_suffix", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3232
 *     @classmethod
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):
 *         if varion_code == "N":             # <<<<<<<<<<<<<<
 *             variation = "nearest"
 *         elif varion_code == "L":
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_varion_code, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3232, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3233
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):
 *         if varion_code == "N":
 *             variation = "nearest"             # <<<<<<<<<<<<<<
 *         elif varion_code == "L":
 *             variation = "last"
 */
    __Pyx_INCREF(__pyx_n_u_nearest);
    __pyx_v_variation = __pyx_n_u_nearest;

    /* "pandas/_libs/tslibs/offsets.pyx":3232
 *     @classmethod
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):
 *         if varion_code == "N":             # <<<<<<<<<<<<<<
 *             variation = "nearest"
 *         elif varion_code == "L":
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3234
 *         if varion_code == "N":
 *             variation = "nearest"
 *         elif varion_code == "L":             # <<<<<<<<<<<<<<
 *             variation = "last"
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_varion_code, __pyx_n_u_L, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3234, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3235
 *             variation = "nearest"
 *         elif varion_code == "L":
 *             variation = "last"             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(f"Unable to parse varion_code: {varion_code}")
 */
    __Pyx_INCREF(__pyx_n_u_last);
    __pyx_v_variation = __pyx_n_u_last;

    /* "pandas/_libs/tslibs/offsets.pyx":3234
 *         if varion_code == "N":
 *             variation = "nearest"
 *         elif varion_code == "L":             # <<<<<<<<<<<<<<
 *             variation = "last"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3237
 *             variation = "last"
 *         else:
 *             raise ValueError(f"Unable to parse varion_code: {varion_code}")             # <<<<<<<<<<<<<<
 * 
 *         startingMonth = MONTH_TO_CAL_NUM[startingMonth_code]
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_varion_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unable_to_parse_varion_code, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3237, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3239
 *             raise ValueError(f"Unable to parse varion_code: {varion_code}")
 * 
 *         startingMonth = MONTH_TO_CAL_NUM[startingMonth_code]             # <<<<<<<<<<<<<<
 *         weekday = weekday_to_int[weekday_code]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MONTH_TO_CAL_NUM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_startingMonth_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_startingMonth = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3240
 * 
 *         startingMonth = MONTH_TO_CAL_NUM[startingMonth_code]
 *         weekday = weekday_to_int[weekday_code]             # <<<<<<<<<<<<<<
 * 
 *         return {
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_weekday_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_weekday_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_weekday = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3242
 *         weekday = weekday_to_int[weekday_code]
 * 
 *         return {             # <<<<<<<<<<<<<<
 *             "weekday": weekday,
 *             "startingMonth": startingMonth,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/_libs/tslibs/offsets.pyx":3243
 * 
 *         return {
 *             "weekday": weekday,             # <<<<<<<<<<<<<<
 *             "startingMonth": startingMonth,
 *             "variation": variation,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_weekday, __pyx_v_weekday) < 0) __PYX_ERR(0, 3243, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3244
 *         return {
 *             "weekday": weekday,
 *             "startingMonth": startingMonth,             # <<<<<<<<<<<<<<
 *             "variation": variation,
 *         }
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_startingMonth, __pyx_v_startingMonth) < 0) __PYX_ERR(0, 3243, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3245
 *             "weekday": weekday,
 *             "startingMonth": startingMonth,
 *             "variation": variation,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_variation, __pyx_v_variation) < 0) __PYX_ERR(0, 3243, __pyx_L1_error)
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3231
 * 
 *     @classmethod
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):             # <<<<<<<<<<<<<<
 *         if varion_code == "N":
 *             variation = "nearest"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253._parse_suffix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_variation);
  __Pyx_XDECREF(__pyx_v_startingMonth);
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3249
 * 
 *     @classmethod
 *     def _from_name(cls, *args):             # <<<<<<<<<<<<<<
 *         return cls(**cls._parse_suffix(*args))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_9_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_9_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_from_name", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_8_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_args);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6FY5253_8_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3250
 *     @classmethod
 *     def _from_name(cls, *args):
 *         return cls(**cls._parse_suffix(*args))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_parse_suffix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 3250, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_t_3))) {
    __pyx_t_1 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3249
 * 
 *     @classmethod
 *     def _from_name(cls, *args):             # <<<<<<<<<<<<<<
 *         return cls(**cls._parse_suffix(*args))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3331
 *         int qtr_with_extra_week
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekday = 0;
  PyObject *__pyx_v_startingMonth = 0;
  PyObject *__pyx_v_qtr_with_extra_week = 0;
  PyObject *__pyx_v_variation = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekday,&__pyx_n_s_startingMonth,&__pyx_n_s_qtr_with_extra_week,&__pyx_n_s_variation,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);

    /* "pandas/_libs/tslibs/offsets.pyx":3334
 *         self,
 *         n=1,
 *         normalize=False,             # <<<<<<<<<<<<<<
 *         weekday=0,
 *         startingMonth=1,
 */
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)__pyx_int_1);
    values[4] = ((PyObject *)__pyx_int_1);
    values[5] = ((PyObject *)__pyx_n_u_nearest);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekday);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startingMonth);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qtr_with_extra_week);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variation);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3331, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekday = values[2];
    __pyx_v_startingMonth = values[3];
    __pyx_v_qtr_with_extra_week = values[4];
    __pyx_v_variation = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3331, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday, __pyx_v_startingMonth, __pyx_v_qtr_with_extra_week, __pyx_v_variation);

  /* "pandas/_libs/tslibs/offsets.pyx":3331
 *         int qtr_with_extra_week
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekday, PyObject *__pyx_v_startingMonth, PyObject *__pyx_v_qtr_with_extra_week, PyObject *__pyx_v_variation) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3340
 *         variation="nearest",
 *     ):
 *         FY5253Mixin.__init__(             # <<<<<<<<<<<<<<
 *             self, n, normalize, weekday, startingMonth, variation
 *         )
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":3341
 *     ):
 *         FY5253Mixin.__init__(
 *             self, n, normalize, weekday, startingMonth, variation             # <<<<<<<<<<<<<<
 *         )
 *         self.qtr_with_extra_week = qtr_with_extra_week
 */
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday, __pyx_v_startingMonth, __pyx_v_variation};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3340, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekday, __pyx_v_startingMonth, __pyx_v_variation};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3340, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(6+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_weekday);
    __Pyx_GIVEREF(__pyx_v_weekday);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_weekday);
    __Pyx_INCREF(__pyx_v_startingMonth);
    __Pyx_GIVEREF(__pyx_v_startingMonth);
    PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_startingMonth);
    __Pyx_INCREF(__pyx_v_variation);
    __Pyx_GIVEREF(__pyx_v_variation);
    PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_4, __pyx_v_variation);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3343
 *             self, n, normalize, weekday, startingMonth, variation
 *         )
 *         self.qtr_with_extra_week = qtr_with_extra_week             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_qtr_with_extra_week); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3343, __pyx_L1_error)
  __pyx_v_self->qtr_with_extra_week = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":3331
 *         int qtr_with_extra_week
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3345
 *         self.qtr_with_extra_week = qtr_with_extra_week
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         FY5253Mixin.__setstate__(self, state)
 *         self.qtr_with_extra_week = state.pop("qtr_with_extra_week")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3346
 * 
 *     cpdef __setstate__(self, state):
 *         FY5253Mixin.__setstate__(self, state)             # <<<<<<<<<<<<<<
 *         self.qtr_with_extra_week = state.pop("qtr_with_extra_week")
 * 
 */
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)__pyx_v_self), __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3347
 *     cpdef __setstate__(self, state):
 *         FY5253Mixin.__setstate__(self, state)
 *         self.qtr_with_extra_week = state.pop("qtr_with_extra_week")             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_qtr_with_extra_week) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_qtr_with_extra_week);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->qtr_with_extra_week = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":3345
 *         self.qtr_with_extra_week = qtr_with_extra_week
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         FY5253Mixin.__setstate__(self, state)
 *         self.qtr_with_extra_week = state.pop("qtr_with_extra_week")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3350
 * 
 *     @cache_readonly
 *     def _offset(self):             # <<<<<<<<<<<<<<
 *         return FY5253(
 *             startingMonth=self.startingMonth,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_5_offset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_5_offset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_offset (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_4_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self));

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

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

  /* "pandas/_libs/tslibs/offsets.pyx":3351
 *     @cache_readonly
 *     def _offset(self):
 *         return FY5253(             # <<<<<<<<<<<<<<
 *             startingMonth=self.startingMonth,
 *             weekday=self.weekday,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/_libs/tslibs/offsets.pyx":3352
 *     def _offset(self):
 *         return FY5253(
 *             startingMonth=self.startingMonth,             # <<<<<<<<<<<<<<
 *             weekday=self.weekday,
 *             variation=self.variation,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.startingMonth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_startingMonth, __pyx_t_2) < 0) __PYX_ERR(0, 3352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3353
 *         return FY5253(
 *             startingMonth=self.startingMonth,
 *             weekday=self.weekday,             # <<<<<<<<<<<<<<
 *             variation=self.variation,
 *         )
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_weekday, __pyx_t_2) < 0) __PYX_ERR(0, 3352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3354
 *             startingMonth=self.startingMonth,
 *             weekday=self.weekday,
 *             variation=self.variation,             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_variation, __pyx_v_self->__pyx_base.variation) < 0) __PYX_ERR(0, 3352, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3351
 *     @cache_readonly
 *     def _offset(self):
 *         return FY5253(             # <<<<<<<<<<<<<<
 *             startingMonth=self.startingMonth,
 *             weekday=self.weekday,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3350
 * 
 *     @cache_readonly
 *     def _offset(self):             # <<<<<<<<<<<<<<
 *         return FY5253(
 *             startingMonth=self.startingMonth,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter._offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3357
 *         )
 * 
 *     def _rollback_to_year(self, other: datetime):             # <<<<<<<<<<<<<<
 *         """
 *         Roll `other` back to the most recent date that was on a fiscal year
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_7_rollback_to_year(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_6_rollback_to_year[] = "\n        Roll `other` back to the most recent date that was on a fiscal year\n        end.\n\n        Return the date of that year-end, the number of full quarters\n        elapsed between that year-end and other, and the remaining Timedelta\n        since the most recent quarter-end.\n\n        Parameters\n        ----------\n        other : datetime or Timestamp\n\n        Returns\n        -------\n        tuple of\n        prev_year_end : Timestamp giving most recent fiscal year end\n        num_qtrs : int\n        tdelta : Timedelta\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_7_rollback_to_year(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_rollback_to_year (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 3357, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_6_rollback_to_year(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_6_rollback_to_year(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_num_qtrs = NULL;
  PyObject *__pyx_v_norm = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_qtr_lens = NULL;
  PyDateTime_DateTime *__pyx_v_end = NULL;
  PyObject *__pyx_v_tdelta = NULL;
  PyObject *__pyx_v_qlen = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  NPY_DATETIMEUNIT __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_rollback_to_year", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3377
 *         tdelta : Timedelta
 *         """
 *         num_qtrs = 0             # <<<<<<<<<<<<<<
 * 
 *         norm = Timestamp(other).tz_localize(None)
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_num_qtrs = __pyx_int_0;

  /* "pandas/_libs/tslibs/offsets.pyx":3379
 *         num_qtrs = 0
 * 
 *         norm = Timestamp(other).tz_localize(None)             # <<<<<<<<<<<<<<
 *         start = self._offset.rollback(norm)
 *         # Note: start <= norm and self._offset.is_on_offset(start)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tz_localize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_3, Py_None);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_norm = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3380
 * 
 *         norm = Timestamp(other).tz_localize(None)
 *         start = self._offset.rollback(norm)             # <<<<<<<<<<<<<<
 *         # Note: start <= norm and self._offset.is_on_offset(start)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rollback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_norm) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_norm);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3383
 *         # Note: start <= norm and self._offset.is_on_offset(start)
 * 
 *         if start < norm:             # <<<<<<<<<<<<<<
 *             # roll adjustment
 *             qtr_lens = self.get_weeks(norm)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_norm, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3383, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":3385
 *         if start < norm:
 *             # roll adjustment
 *             qtr_lens = self.get_weeks(norm)             # <<<<<<<<<<<<<<
 * 
 *             # check that qtr_lens is consistent with self._offset addition
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_weeks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_norm) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_norm);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_qtr_lens = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3388
 * 
 *             # check that qtr_lens is consistent with self._offset addition
 *             end = _shift_day(start, days=7 * sum(qtr_lens))             # <<<<<<<<<<<<<<
 *             assert self._offset.is_on_offset(end), (start, end, qtr_lens)
 * 
 */
    if (!(likely(((__pyx_v_start) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_start, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3388, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_v_qtr_lens); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Multiply(__pyx_int_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3388, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_day(((PyDateTime_DateTime *)__pyx_v_start), __pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_end = ((PyDateTime_DateTime *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3389
 *             # check that qtr_lens is consistent with self._offset addition
 *             end = _shift_day(start, days=7 * sum(qtr_lens))
 *             assert self._offset.is_on_offset(end), (start, end, qtr_lens)             # <<<<<<<<<<<<<<
 * 
 *             tdelta = norm - start
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, ((PyObject *)__pyx_v_end)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_end));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3389, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) {
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3389, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_start);
        __Pyx_GIVEREF(__pyx_v_start);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start);
        __Pyx_INCREF(((PyObject *)__pyx_v_end));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_end));
        PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_end));
        __Pyx_INCREF(__pyx_v_qtr_lens);
        __Pyx_GIVEREF(__pyx_v_qtr_lens);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_qtr_lens);
        __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3389, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        PyErr_SetObject(PyExc_AssertionError, __pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 3389, __pyx_L1_error)
      }
    }
    #endif

    /* "pandas/_libs/tslibs/offsets.pyx":3391
 *             assert self._offset.is_on_offset(end), (start, end, qtr_lens)
 * 
 *             tdelta = norm - start             # <<<<<<<<<<<<<<
 *             for qlen in qtr_lens:
 *                 if qlen * 7 <= tdelta.days:
 */
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_norm, __pyx_v_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_tdelta = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3392
 * 
 *             tdelta = norm - start
 *             for qlen in qtr_lens:             # <<<<<<<<<<<<<<
 *                 if qlen * 7 <= tdelta.days:
 *                     num_qtrs += 1
 */
    if (likely(PyList_CheckExact(__pyx_v_qtr_lens)) || PyTuple_CheckExact(__pyx_v_qtr_lens)) {
      __pyx_t_3 = __pyx_v_qtr_lens; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_qtr_lens); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3392, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3392, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3392, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3392, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3392, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3392, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_qlen, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3393
 *             tdelta = norm - start
 *             for qlen in qtr_lens:
 *                 if qlen * 7 <= tdelta.days:             # <<<<<<<<<<<<<<
 *                     num_qtrs += 1
 *                     tdelta -= (<_Timedelta>Timedelta(days=qlen * 7))._as_reso(norm._reso)
 */
      __pyx_t_2 = PyNumber_Multiply(__pyx_v_qlen, __pyx_int_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tdelta, __pyx_n_s_days); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3393, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3393, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {

        /* "pandas/_libs/tslibs/offsets.pyx":3394
 *             for qlen in qtr_lens:
 *                 if qlen * 7 <= tdelta.days:
 *                     num_qtrs += 1             # <<<<<<<<<<<<<<
 *                     tdelta -= (<_Timedelta>Timedelta(days=qlen * 7))._as_reso(norm._reso)
 *                 else:
 */
        __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_num_qtrs, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_num_qtrs, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3395
 *                 if qlen * 7 <= tdelta.days:
 *                     num_qtrs += 1
 *                     tdelta -= (<_Timedelta>Timedelta(days=qlen * 7))._as_reso(norm._reso)             # <<<<<<<<<<<<<<
 *                 else:
 *                     break
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PyNumber_Multiply(__pyx_v_qlen, __pyx_int_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_days, __pyx_t_2) < 0) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_norm, __pyx_n_s_reso_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = ((NPY_DATETIMEUNIT)__Pyx_PyInt_As_NPY_DATETIMEUNIT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_t_2)->__pyx_vtab)->_as_reso(((struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta *)__pyx_t_2), __pyx_t_9, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_tdelta, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_tdelta, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3393
 *             tdelta = norm - start
 *             for qlen in qtr_lens:
 *                 if qlen * 7 <= tdelta.days:             # <<<<<<<<<<<<<<
 *                     num_qtrs += 1
 *                     tdelta -= (<_Timedelta>Timedelta(days=qlen * 7))._as_reso(norm._reso)
 */
        goto __pyx_L6;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":3397
 *                     tdelta -= (<_Timedelta>Timedelta(days=qlen * 7))._as_reso(norm._reso)
 *                 else:
 *                     break             # <<<<<<<<<<<<<<
 *         else:
 *             tdelta = Timedelta(0)
 */
      /*else*/ {
        goto __pyx_L5_break;
      }
      __pyx_L6:;

      /* "pandas/_libs/tslibs/offsets.pyx":3392
 * 
 *             tdelta = norm - start
 *             for qlen in qtr_lens:             # <<<<<<<<<<<<<<
 *                 if qlen * 7 <= tdelta.days:
 *                     num_qtrs += 1
 */
    }
    __pyx_L5_break:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3383
 *         # Note: start <= norm and self._offset.is_on_offset(start)
 * 
 *         if start < norm:             # <<<<<<<<<<<<<<
 *             # roll adjustment
 *             qtr_lens = self.get_weeks(norm)
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3399
 *                     break
 *         else:
 *             tdelta = Timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *         # Note: we always have tdelta.value >= 0
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tdelta = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3402
 * 
 *         # Note: we always have tdelta.value >= 0
 *         return start, num_qtrs, tdelta             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_start);
  __Pyx_INCREF(__pyx_v_num_qtrs);
  __Pyx_GIVEREF(__pyx_v_num_qtrs);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_num_qtrs);
  __Pyx_INCREF(__pyx_v_tdelta);
  __Pyx_GIVEREF(__pyx_v_tdelta);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_tdelta);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3357
 *         )
 * 
 *     def _rollback_to_year(self, other: datetime):             # <<<<<<<<<<<<<<
 *         """
 *         Roll `other` back to the most recent date that was on a fiscal year
 */

  /* 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("pandas._libs.tslibs.offsets.FY5253Quarter._rollback_to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_num_qtrs);
  __Pyx_XDECREF(__pyx_v_norm);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_qtr_lens);
  __Pyx_XDECREF((PyObject *)__pyx_v_end);
  __Pyx_XDECREF(__pyx_v_tdelta);
  __Pyx_XDECREF(__pyx_v_qlen);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3405
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # Note: self.n == 0 is not allowed.
 * 
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 3405, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_8_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_8_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_prev_year_end = NULL;
  PyObject *__pyx_v_num_qtrs = NULL;
  PyObject *__pyx_v_tdelta = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_years = NULL;
  PyObject *__pyx_v_qtr_lens = NULL;
  PyObject *__pyx_v_weeks = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3408
 *         # Note: self.n == 0 is not allowed.
 * 
 *         n = self.n             # <<<<<<<<<<<<<<
 * 
 *         prev_year_end, num_qtrs, tdelta = self._rollback_to_year(other)
 */
  __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3410
 *         n = self.n
 * 
 *         prev_year_end, num_qtrs, tdelta = self._rollback_to_year(other)             # <<<<<<<<<<<<<<
 *         res = prev_year_end
 *         n += num_qtrs
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rollback_to_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_other));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3410, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 3410, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3410, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_prev_year_end = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_num_qtrs = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_tdelta = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3411
 * 
 *         prev_year_end, num_qtrs, tdelta = self._rollback_to_year(other)
 *         res = prev_year_end             # <<<<<<<<<<<<<<
 *         n += num_qtrs
 *         if self.n <= 0 and tdelta.value > 0:
 */
  __Pyx_INCREF(__pyx_v_prev_year_end);
  __pyx_v_res = __pyx_v_prev_year_end;

  /* "pandas/_libs/tslibs/offsets.pyx":3412
 *         prev_year_end, num_qtrs, tdelta = self._rollback_to_year(other)
 *         res = prev_year_end
 *         n += num_qtrs             # <<<<<<<<<<<<<<
 *         if self.n <= 0 and tdelta.value > 0:
 *             n += 1
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_n, __pyx_v_num_qtrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3413
 *         res = prev_year_end
 *         n += num_qtrs
 *         if self.n <= 0 and tdelta.value > 0:             # <<<<<<<<<<<<<<
 *             n += 1
 * 
 */
  __pyx_t_8 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n <= 0) != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tdelta, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":3414
 *         n += num_qtrs
 *         if self.n <= 0 and tdelta.value > 0:
 *             n += 1             # <<<<<<<<<<<<<<
 * 
 *         # Possible speedup by handling years first.
 */
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3413
 *         res = prev_year_end
 *         n += num_qtrs
 *         if self.n <= 0 and tdelta.value > 0:             # <<<<<<<<<<<<<<
 *             n += 1
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3417
 * 
 *         # Possible speedup by handling years first.
 *         years = n // 4             # <<<<<<<<<<<<<<
 *         if years:
 *             res += self._offset * years
 */
  __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_n, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_years = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3418
 *         # Possible speedup by handling years first.
 *         years = n // 4
 *         if years:             # <<<<<<<<<<<<<<
 *             res += self._offset * years
 *             n -= years * 4
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_years); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3418, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":3419
 *         years = n // 4
 *         if years:
 *             res += self._offset * years             # <<<<<<<<<<<<<<
 *             n -= years * 4
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_v_years); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_res, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3420
 *         if years:
 *             res += self._offset * years
 *             n -= years * 4             # <<<<<<<<<<<<<<
 * 
 *         # Add an extra day to make *sure* we are getting the quarter lengths
 */
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_years, __pyx_int_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_n, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3418
 *         # Possible speedup by handling years first.
 *         years = n // 4
 *         if years:             # <<<<<<<<<<<<<<
 *             res += self._offset * years
 *             n -= years * 4
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3424
 *         # Add an extra day to make *sure* we are getting the quarter lengths
 *         # for the upcoming year, not the previous year
 *         qtr_lens = self.get_weeks(res + Timedelta(days=1))             # <<<<<<<<<<<<<<
 * 
 *         # Note: we always have 0 <= n < 4
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_weeks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_days, __pyx_int_1) < 0) __PYX_ERR(0, 3424, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_v_res, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_qtr_lens = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3427
 * 
 *         # Note: we always have 0 <= n < 4
 *         weeks = sum(qtr_lens[:n])             # <<<<<<<<<<<<<<
 *         if weeks:
 *             res = _shift_day(res, days=weeks * 7)
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_qtr_lens, 0, 0, NULL, &__pyx_v_n, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_weeks = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3428
 *         # Note: we always have 0 <= n < 4
 *         weeks = sum(qtr_lens[:n])
 *         if weeks:             # <<<<<<<<<<<<<<
 *             res = _shift_day(res, days=weeks * 7)
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_weeks); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3428, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "pandas/_libs/tslibs/offsets.pyx":3429
 *         weeks = sum(qtr_lens[:n])
 *         if weeks:
 *             res = _shift_day(res, days=weeks * 7)             # <<<<<<<<<<<<<<
 * 
 *         return res
 */
    if (!(likely(((__pyx_v_res) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_res, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3429, __pyx_L1_error)
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_weeks, __pyx_int_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_day(((PyDateTime_DateTime *)__pyx_v_res), __pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3428
 *         # Note: we always have 0 <= n < 4
 *         weeks = sum(qtr_lens[:n])
 *         if weeks:             # <<<<<<<<<<<<<<
 *             res = _shift_day(res, days=weeks * 7)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3431
 *             res = _shift_day(res, days=weeks * 7)
 * 
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def get_weeks(self, dt: datetime):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_res) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_res, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3431, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_v_res);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3405
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # Note: self.n == 0 is not allowed.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_prev_year_end);
  __Pyx_XDECREF(__pyx_v_num_qtrs);
  __Pyx_XDECREF(__pyx_v_tdelta);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_years);
  __Pyx_XDECREF(__pyx_v_qtr_lens);
  __Pyx_XDECREF(__pyx_v_weeks);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3433
 *         return res
 * 
 *     def get_weeks(self, dt: datetime):             # <<<<<<<<<<<<<<
 *         ret = [13] * 4
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_11get_weeks(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_11get_weeks(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_weeks (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3433, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_10get_weeks(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_10get_weeks(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_year_has_extra_week = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  long __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_weeks", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3434
 * 
 *     def get_weeks(self, dt: datetime):
 *         ret = [13] * 4             # <<<<<<<<<<<<<<
 * 
 *         year_has_extra_week = self.year_has_extra_week(dt)
 */
  __pyx_t_1 = PyList_New(1 * 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < 4; __pyx_temp++) {
      __Pyx_INCREF(__pyx_int_13);
      __Pyx_GIVEREF(__pyx_int_13);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_13);
    }
  }
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3436
 *         ret = [13] * 4
 * 
 *         year_has_extra_week = self.year_has_extra_week(dt)             # <<<<<<<<<<<<<<
 * 
 *         if year_has_extra_week:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_year_has_extra_week); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_year_has_extra_week = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3438
 *         year_has_extra_week = self.year_has_extra_week(dt)
 * 
 *         if year_has_extra_week:             # <<<<<<<<<<<<<<
 *             ret[self.qtr_with_extra_week - 1] = 14
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_year_has_extra_week); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3438, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":3439
 * 
 *         if year_has_extra_week:
 *             ret[self.qtr_with_extra_week - 1] = 14             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
    __pyx_t_5 = (__pyx_v_self->qtr_with_extra_week - 1);
    if (unlikely(__Pyx_SetItemInt(__pyx_v_ret, __pyx_t_5, __pyx_int_14, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 3439, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3438
 *         year_has_extra_week = self.year_has_extra_week(dt)
 * 
 *         if year_has_extra_week:             # <<<<<<<<<<<<<<
 *             ret[self.qtr_with_extra_week - 1] = 14
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3441
 *             ret[self.qtr_with_extra_week - 1] = 14
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     def year_has_extra_week(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3433
 *         return res
 * 
 *     def get_weeks(self, dt: datetime):             # <<<<<<<<<<<<<<
 *         ret = [13] * 4
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.get_weeks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_year_has_extra_week);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3443
 *         return ret
 * 
 *     def year_has_extra_week(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         # Avoid round-down errors --> normalize to get
 *         # e.g. '370D' instead of '360D23H'
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_13year_has_extra_week(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_13year_has_extra_week(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("year_has_extra_week (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3443, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_12year_has_extra_week(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_12year_has_extra_week(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_norm = NULL;
  PyObject *__pyx_v_next_year_end = NULL;
  PyObject *__pyx_v_prev_year_end = NULL;
  PyObject *__pyx_v_weeks_in_year = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("year_has_extra_week", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3446
 *         # Avoid round-down errors --> normalize to get
 *         # e.g. '370D' instead of '360D23H'
 *         norm = Timestamp(dt).normalize().tz_localize(None)             # <<<<<<<<<<<<<<
 * 
 *         next_year_end = self._offset.rollforward(norm)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_normalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tz_localize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_norm = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3448
 *         norm = Timestamp(dt).normalize().tz_localize(None)
 * 
 *         next_year_end = self._offset.rollforward(norm)             # <<<<<<<<<<<<<<
 *         prev_year_end = norm - self._offset
 *         weeks_in_year = (next_year_end - prev_year_end).days / 7
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rollforward); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_norm) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_norm);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_next_year_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3449
 * 
 *         next_year_end = self._offset.rollforward(norm)
 *         prev_year_end = norm - self._offset             # <<<<<<<<<<<<<<
 *         weeks_in_year = (next_year_end - prev_year_end).days / 7
 *         assert weeks_in_year in [52, 53], weeks_in_year
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_norm, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_prev_year_end = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3450
 *         next_year_end = self._offset.rollforward(norm)
 *         prev_year_end = norm - self._offset
 *         weeks_in_year = (next_year_end - prev_year_end).days / 7             # <<<<<<<<<<<<<<
 *         assert weeks_in_year in [52, 53], weeks_in_year
 *         return weeks_in_year == 53
 */
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_next_year_end, __pyx_v_prev_year_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_days); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_1, __pyx_int_7, 7, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_weeks_in_year = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3451
 *         prev_year_end = norm - self._offset
 *         weeks_in_year = (next_year_end - prev_year_end).days / 7
 *         assert weeks_in_year in [52, 53], weeks_in_year             # <<<<<<<<<<<<<<
 *         return weeks_in_year == 53
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __Pyx_INCREF(__pyx_v_weeks_in_year);
    __pyx_t_2 = __pyx_v_weeks_in_year;
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_52, 52, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3451, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_53, 53, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3451, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_7;
    __pyx_L3_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!(__pyx_t_6 != 0))) {
      __pyx_t_2 = PyTuple_Pack(1, __pyx_v_weeks_in_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 3451, __pyx_L1_error)
    }
  }
  #endif

  /* "pandas/_libs/tslibs/offsets.pyx":3452
 *         weeks_in_year = (next_year_end - prev_year_end).days / 7
 *         assert weeks_in_year in [52, 53], weeks_in_year
 *         return weeks_in_year == 53             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_weeks_in_year, __pyx_int_53, 53, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3443
 *         return ret
 * 
 *     def year_has_extra_week(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         # Avoid round-down errors --> normalize to get
 *         # e.g. '370D' instead of '360D23H'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.year_has_extra_week", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_norm);
  __Pyx_XDECREF(__pyx_v_next_year_end);
  __Pyx_XDECREF(__pyx_v_prev_year_end);
  __Pyx_XDECREF(__pyx_v_weeks_in_year);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3454
 *         return weeks_in_year == 53
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_15is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_15is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3454, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_14is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_14is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_next_year_end = NULL;
  PyObject *__pyx_v_qtr_lens = NULL;
  PyObject *__pyx_v_current = NULL;
  PyObject *__pyx_v_qtr_len = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3455
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         if self._offset.is_on_offset(dt):
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3456
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         if self._offset.is_on_offset(dt):
 *             return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3455
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         if self._offset.is_on_offset(dt):
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3457
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         if self._offset.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_on_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3458
 *             return False
 *         if self._offset.is_on_offset(dt):
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         next_year_end = dt - self._offset
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3457
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         if self._offset.is_on_offset(dt):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3460
 *             return True
 * 
 *         next_year_end = dt - self._offset             # <<<<<<<<<<<<<<
 * 
 *         qtr_lens = self.get_weeks(dt)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyNumber_Subtract(((PyObject *)__pyx_v_dt), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_next_year_end = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3462
 *         next_year_end = dt - self._offset
 * 
 *         qtr_lens = self.get_weeks(dt)             # <<<<<<<<<<<<<<
 * 
 *         current = next_year_end
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_weeks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_dt)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_dt));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_qtr_lens = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3464
 *         qtr_lens = self.get_weeks(dt)
 * 
 *         current = next_year_end             # <<<<<<<<<<<<<<
 *         for qtr_len in qtr_lens:
 *             current = _shift_day(current, days=qtr_len * 7)
 */
  __Pyx_INCREF(__pyx_v_next_year_end);
  __pyx_v_current = __pyx_v_next_year_end;

  /* "pandas/_libs/tslibs/offsets.pyx":3465
 * 
 *         current = next_year_end
 *         for qtr_len in qtr_lens:             # <<<<<<<<<<<<<<
 *             current = _shift_day(current, days=qtr_len * 7)
 *             if dt == current:
 */
  if (likely(PyList_CheckExact(__pyx_v_qtr_lens)) || PyTuple_CheckExact(__pyx_v_qtr_lens)) {
    __pyx_t_5 = __pyx_v_qtr_lens; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_qtr_lens); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3465, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3465, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3465, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3465, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_qtr_len, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3466
 *         current = next_year_end
 *         for qtr_len in qtr_lens:
 *             current = _shift_day(current, days=qtr_len * 7)             # <<<<<<<<<<<<<<
 *             if dt == current:
 *                 return True
 */
    if (!(likely(((__pyx_v_current) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_current, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3466, __pyx_L1_error)
    __pyx_t_3 = PyNumber_Multiply(__pyx_v_qtr_len, __pyx_int_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_day(((PyDateTime_DateTime *)__pyx_v_current), __pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_current, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3467
 *         for qtr_len in qtr_lens:
 *             current = _shift_day(current, days=qtr_len * 7)
 *             if dt == current:             # <<<<<<<<<<<<<<
 *                 return True
 *         return False
 */
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_dt), __pyx_v_current, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3467, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3467, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":3468
 *             current = _shift_day(current, days=qtr_len * 7)
 *             if dt == current:
 *                 return True             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pandas/_libs/tslibs/offsets.pyx":3467
 *         for qtr_len in qtr_lens:
 *             current = _shift_day(current, days=qtr_len * 7)
 *             if dt == current:             # <<<<<<<<<<<<<<
 *                 return True
 *         return False
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3465
 * 
 *         current = next_year_end
 *         for qtr_len in qtr_lens:             # <<<<<<<<<<<<<<
 *             current = _shift_day(current, days=qtr_len * 7)
 *             if dt == current:
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3469
 *             if dt == current:
 *                 return True
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3454
 *         return weeks_in_year == 53
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_next_year_end);
  __Pyx_XDECREF(__pyx_v_qtr_lens);
  __Pyx_XDECREF(__pyx_v_current);
  __Pyx_XDECREF(__pyx_v_qtr_len);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3472
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         suffix = FY5253Mixin.rule_code.__get__(self)
 *         qtr = self.qtr_with_extra_week
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9rule_code_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9rule_code_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9rule_code___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9rule_code___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self) {
  PyObject *__pyx_v_suffix = NULL;
  int __pyx_v_qtr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3473
 *     @property
 *     def rule_code(self) -> str:
 *         suffix = FY5253Mixin.rule_code.__get__(self)             # <<<<<<<<<<<<<<
 *         qtr = self.qtr_with_extra_week
 *         return f"{suffix}-{qtr}"
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin), __pyx_n_s_rule_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self));
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_suffix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3474
 *     def rule_code(self) -> str:
 *         suffix = FY5253Mixin.rule_code.__get__(self)
 *         qtr = self.qtr_with_extra_week             # <<<<<<<<<<<<<<
 *         return f"{suffix}-{qtr}"
 * 
 */
  __pyx_t_4 = __pyx_v_self->qtr_with_extra_week;
  __pyx_v_qtr = __pyx_t_4;

  /* "pandas/_libs/tslibs/offsets.pyx":3475
 *         suffix = FY5253Mixin.rule_code.__get__(self)
 *         qtr = self.qtr_with_extra_week
 *         return f"{suffix}-{qtr}"             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_suffix, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u__39);
  __pyx_t_5 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__39);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__39);
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_qtr, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3472
 * 
 *     @property
 *     def rule_code(self) -> str:             # <<<<<<<<<<<<<<
 *         suffix = FY5253Mixin.rule_code.__get__(self)
 *         qtr = self.qtr_with_extra_week
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.rule_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_suffix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3478
 * 
 *     @classmethod
 *     def _from_name(cls, *args):             # <<<<<<<<<<<<<<
 *         return cls(
 *             **dict(FY5253._parse_suffix(*args[:-1]), qtr_with_extra_week=int(args[-1]))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_17_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_17_from_name(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_name (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_from_name", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_16_from_name(((PyTypeObject*)__pyx_v_cls), __pyx_v_args);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_16_from_name(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_name", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3479
 *     @classmethod
 *     def _from_name(cls, *args):
 *         return cls(             # <<<<<<<<<<<<<<
 *             **dict(FY5253._parse_suffix(*args[:-1]), qtr_with_extra_week=int(args[-1]))
 *         )
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/_libs/tslibs/offsets.pyx":3480
 *     def _from_name(cls, *args):
 *         return cls(
 *             **dict(FY5253._parse_suffix(*args[:-1]), qtr_with_extra_week=int(args[-1]))             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253), __pyx_n_s_parse_suffix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 0, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_qtr_with_extra_week, __pyx_t_5) < 0) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = PyDict_Copy(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3479
 *     @classmethod
 *     def _from_name(cls, *args):
 *         return cls(             # <<<<<<<<<<<<<<
 *             **dict(FY5253._parse_suffix(*args[:-1]), qtr_with_extra_week=int(args[-1]))
 *         )
 */
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3478
 * 
 *     @classmethod
 *     def _from_name(cls, *args):             # <<<<<<<<<<<<<<
 *         return cls(
 *             **dict(FY5253._parse_suffix(*args[:-1]), qtr_with_extra_week=int(args[-1]))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter._from_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3329
 * 
 *     cdef readonly:
 *         int qtr_with_extra_week             # <<<<<<<<<<<<<<
 * 
 *     def __init__(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_19qtr_with_extra_week_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_19qtr_with_extra_week_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_19qtr_with_extra_week___get__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_19qtr_with_extra_week___get__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->qtr_with_extra_week); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.FY5253Quarter.qtr_with_extra_week.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3497
 *     """
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_1__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_1__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3497, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3498
 * 
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")             # <<<<<<<<<<<<<<
 *         self.normalize = state.pop("normalize")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_n) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_n);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.n = __pyx_t_5;

  /* "pandas/_libs/tslibs/offsets.pyx":3499
 *     cpdef __setstate__(self, state):
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_normalize) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_normalize);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.normalize = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":3497
 *     """
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.n = state.pop("n")
 *         self.normalize = state.pop("normalize")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Easter.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_1__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_1__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Easter.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3502
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         current_easter = easter(other.year)
 *         current_easter = datetime(
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_3_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 3502, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter_2_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter_2_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_current_easter = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_new = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3503
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:
 *         current_easter = easter(other.year)             # <<<<<<<<<<<<<<
 *         current_easter = datetime(
 *             current_easter.year, current_easter.month, current_easter.day
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_easter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_current_easter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3505
 *         current_easter = easter(other.year)
 *         current_easter = datetime(
 *             current_easter.year, current_easter.month, current_easter.day             # <<<<<<<<<<<<<<
 *         )
 *         current_easter = localize_pydatetime(current_easter, other.tzinfo)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_easter, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_easter, __pyx_n_s_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_easter, __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pandas/_libs/tslibs/offsets.pyx":3504
 *     def _apply(self, other: datetime) -> datetime:
 *         current_easter = easter(other.year)
 *         current_easter = datetime(             # <<<<<<<<<<<<<<
 *             current_easter.year, current_easter.month, current_easter.day
 *         )
 */
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_current_easter, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3507
 *             current_easter.year, current_easter.month, current_easter.day
 *         )
 *         current_easter = localize_pydatetime(current_easter, other.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         n = self.n
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_current_easter, __pyx_ptype_7cpython_8datetime_datetime)))) __PYX_ERR(0, 3507, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7cpython_8datetime_tzinfo))))) __PYX_ERR(0, 3507, __pyx_L1_error)
  __pyx_t_4 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime(((PyDateTime_DateTime *)__pyx_v_current_easter), ((PyDateTime_TZInfo *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_current_easter, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3509
 *         current_easter = localize_pydatetime(current_easter, other.tzinfo)
 * 
 *         n = self.n             # <<<<<<<<<<<<<<
 *         if n >= 0 and other < current_easter:
 *             n -= 1
 */
  __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_n = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3510
 * 
 *         n = self.n
 *         if n >= 0 and other < current_easter:             # <<<<<<<<<<<<<<
 *             n -= 1
 *         elif n < 0 and other > current_easter:
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_other), __pyx_v_current_easter, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":3511
 *         n = self.n
 *         if n >= 0 and other < current_easter:
 *             n -= 1             # <<<<<<<<<<<<<<
 *         elif n < 0 and other > current_easter:
 *             n += 1
 */
    __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3510
 * 
 *         n = self.n
 *         if n >= 0 and other < current_easter:             # <<<<<<<<<<<<<<
 *             n -= 1
 *         elif n < 0 and other > current_easter:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3512
 *         if n >= 0 and other < current_easter:
 *             n -= 1
 *         elif n < 0 and other > current_easter:             # <<<<<<<<<<<<<<
 *             n += 1
 *         # TODO: Why does this handle the 0 case the opposite of others?
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3512, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_other), __pyx_v_current_easter, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3512, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pandas/_libs/tslibs/offsets.pyx":3513
 *             n -= 1
 *         elif n < 0 and other > current_easter:
 *             n += 1             # <<<<<<<<<<<<<<
 *         # TODO: Why does this handle the 0 case the opposite of others?
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3512
 *         if n >= 0 and other < current_easter:
 *             n -= 1
 *         elif n < 0 and other > current_easter:             # <<<<<<<<<<<<<<
 *             n += 1
 *         # TODO: Why does this handle the 0 case the opposite of others?
 */
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3518
 *         # NOTE: easter returns a datetime.date so we have to convert to type of
 *         # other
 *         new = easter(other.year + n)             # <<<<<<<<<<<<<<
 *         new = datetime(
 *             new.year,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_easter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_new = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3520
 *         new = easter(other.year + n)
 *         new = datetime(
 *             new.year,             # <<<<<<<<<<<<<<
 *             new.month,
 *             new.day,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new, __pyx_n_s_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3521
 *         new = datetime(
 *             new.year,
 *             new.month,             # <<<<<<<<<<<<<<
 *             new.day,
 *             other.hour,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_new, __pyx_n_s_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pandas/_libs/tslibs/offsets.pyx":3522
 *             new.year,
 *             new.month,
 *             new.day,             # <<<<<<<<<<<<<<
 *             other.hour,
 *             other.minute,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":3523
 *             new.month,
 *             new.day,
 *             other.hour,             # <<<<<<<<<<<<<<
 *             other.minute,
 *             other.second,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":3524
 *             new.day,
 *             other.hour,
 *             other.minute,             # <<<<<<<<<<<<<<
 *             other.second,
 *             other.microsecond,
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_minute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pandas/_libs/tslibs/offsets.pyx":3525
 *             other.hour,
 *             other.minute,
 *             other.second,             # <<<<<<<<<<<<<<
 *             other.microsecond,
 *         )
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_second); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "pandas/_libs/tslibs/offsets.pyx":3526
 *             other.minute,
 *             other.second,
 *             other.microsecond,             # <<<<<<<<<<<<<<
 *         )
 *         return new
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_microsecond); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "pandas/_libs/tslibs/offsets.pyx":3519
 *         # other
 *         new = easter(other.year + n)
 *         new = datetime(             # <<<<<<<<<<<<<<
 *             new.year,
 *             new.month,
 */
  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_new, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3528
 *             other.microsecond,
 *         )
 *         return new             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(__Pyx_TypeTest(__pyx_v_new, __pyx_ptype_7cpython_8datetime_datetime)))) __PYX_ERR(0, 3528, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_new);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_v_new);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3502
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         current_easter = easter(other.year)
 *         current_easter = datetime(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Easter._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_current_easter);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_new);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3530
 *         return new
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_5is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_5is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3530, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter_4is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_6Easter_4is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3531
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return date(dt.year, dt.month, dt.day) == easter(dt.year)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3532
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         return date(dt.year, dt.month, dt.day) == easter(dt.year)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3531
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         return date(dt.year, dt.month, dt.day) == easter(dt.year)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3533
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         return date(dt.year, dt.month, dt.day) == easter(dt.year)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_date), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_easter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3530
 *         return new
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.Easter.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3571
 *     _apply_array = BaseOffset._apply_array
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekmask = 0;
  PyObject *__pyx_v_holidays = 0;
  PyObject *__pyx_v_calendar = 0;
  PyObject *__pyx_v_offset = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekmask,&__pyx_n_s_holidays,&__pyx_n_s_calendar,&__pyx_n_s_offset_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);

    /* "pandas/_libs/tslibs/offsets.pyx":3574
 *         self,
 *         n=1,
 *         normalize=False,             # <<<<<<<<<<<<<<
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,
 */
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_kp_u_Mon_Tue_Wed_Thu_Fri);

    /* "pandas/_libs/tslibs/offsets.pyx":3576
 *         normalize=False,
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,             # <<<<<<<<<<<<<<
 *         calendar=None,
 *         offset=timedelta(0),
 */
    values[3] = ((PyObject *)Py_None);

    /* "pandas/_libs/tslibs/offsets.pyx":3577
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,
 *         calendar=None,             # <<<<<<<<<<<<<<
 *         offset=timedelta(0),
 *     ):
 */
    values[4] = ((PyObject *)Py_None);
    values[5] = __pyx_k__56;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekmask);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_holidays);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calendar);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3571, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekmask = values[2];
    __pyx_v_holidays = values[3];
    __pyx_v_calendar = values[4];
    __pyx_v_offset = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3571, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessDay.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, __pyx_v_offset);

  /* "pandas/_libs/tslibs/offsets.pyx":3571
 *     _apply_array = BaseOffset._apply_array
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, PyObject *__pyx_v_offset) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3580
 *         offset=timedelta(0),
 *     ):
 *         BusinessDay.__init__(self, n, normalize, offset)             # <<<<<<<<<<<<<<
 *         self._init_custom(weekmask, holidays, calendar)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3580, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3580, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_offset);
    __Pyx_GIVEREF(__pyx_v_offset);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_offset);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3581
 *     ):
 *         BusinessDay.__init__(self, n, normalize, offset)
 *         self._init_custom(weekmask, holidays, calendar)             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_custom(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3571
 *     _apply_array = BaseOffset._apply_array
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessDay.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3583
 *         self._init_custom(weekmask, holidays, calendar)
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.holidays = state.pop("holidays")
 *         self.weekmask = state.pop("weekmask")
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_state, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_3__setstate__)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_state);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3584
 * 
 *     cpdef __setstate__(self, state):
 *         self.holidays = state.pop("holidays")             # <<<<<<<<<<<<<<
 *         self.weekmask = state.pop("weekmask")
 *         BusinessDay.__setstate__(self, state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_holidays) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_holidays);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.holidays);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.holidays);
  __pyx_v_self->__pyx_base.__pyx_base.holidays = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3585
 *     cpdef __setstate__(self, state):
 *         self.holidays = state.pop("holidays")
 *         self.weekmask = state.pop("weekmask")             # <<<<<<<<<<<<<<
 *         BusinessDay.__setstate__(self, state)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_weekmask) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_weekmask);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.weekmask);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.weekmask);
  __pyx_v_self->__pyx_base.__pyx_base.weekmask = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3586
 *         self.holidays = state.pop("holidays")
 *         self.weekmask = state.pop("weekmask")
 *         BusinessDay.__setstate__(self, state)             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)__pyx_v_self), __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3583
 *         self._init_custom(weekmask, holidays, calendar)
 * 
 *     cpdef __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.holidays = state.pop("holidays")
 *         self.weekmask = state.pop("weekmask")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessDay.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_3__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_2__setstate__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)__pyx_v_self), ((PyObject *)__pyx_v_state));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_2__setstate__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___setstate__(__pyx_v_self, __pyx_v_state, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessDay.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3589
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if self.n <= 0:
 *             roll = "forward"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_5_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_5_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_4_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_4_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_roll = NULL;
  PyObject *__pyx_v_date_in = NULL;
  PyObject *__pyx_v_np_dt = NULL;
  PyObject *__pyx_v_np_incr_dt = NULL;
  PyObject *__pyx_v_dt_date = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3590
 *     @apply_wraps
 *     def _apply(self, other):
 *         if self.n <= 0:             # <<<<<<<<<<<<<<
 *             roll = "forward"
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.n <= 0) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3591
 *     def _apply(self, other):
 *         if self.n <= 0:
 *             roll = "forward"             # <<<<<<<<<<<<<<
 *         else:
 *             roll = "backward"
 */
    __Pyx_INCREF(__pyx_n_u_forward);
    __pyx_v_roll = __pyx_n_u_forward;

    /* "pandas/_libs/tslibs/offsets.pyx":3590
 *     @apply_wraps
 *     def _apply(self, other):
 *         if self.n <= 0:             # <<<<<<<<<<<<<<
 *             roll = "forward"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3593
 *             roll = "forward"
 *         else:
 *             roll = "backward"             # <<<<<<<<<<<<<<
 * 
 *         if PyDateTime_Check(other):
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_u_backward);
    __pyx_v_roll = __pyx_n_u_backward;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3595
 *             roll = "backward"
 * 
 *         if PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             date_in = other
 *             np_dt = np.datetime64(date_in.date())
 */
  __pyx_t_1 = (PyDateTime_Check(__pyx_v_other) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3596
 * 
 *         if PyDateTime_Check(other):
 *             date_in = other             # <<<<<<<<<<<<<<
 *             np_dt = np.datetime64(date_in.date())
 * 
 */
    __Pyx_INCREF(__pyx_v_other);
    __pyx_v_date_in = __pyx_v_other;

    /* "pandas/_libs/tslibs/offsets.pyx":3597
 *         if PyDateTime_Check(other):
 *             date_in = other
 *             np_dt = np.datetime64(date_in.date())             # <<<<<<<<<<<<<<
 * 
 *             np_incr_dt = np.busday_offset(
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_date_in, __pyx_n_s_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_np_dt = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3599
 *             np_dt = np.datetime64(date_in.date())
 * 
 *             np_incr_dt = np.busday_offset(             # <<<<<<<<<<<<<<
 *                 np_dt, self.n, roll=roll, busdaycal=self.calendar
 *             )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_busday_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3600
 * 
 *             np_incr_dt = np.busday_offset(
 *                 np_dt, self.n, roll=roll, busdaycal=self.calendar             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "pandas/_libs/tslibs/offsets.pyx":3599
 *             np_dt = np.datetime64(date_in.date())
 * 
 *             np_incr_dt = np.busday_offset(             # <<<<<<<<<<<<<<
 *                 np_dt, self.n, roll=roll, busdaycal=self.calendar
 *             )
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_np_dt);
    __Pyx_GIVEREF(__pyx_v_np_dt);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_np_dt);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3600
 * 
 *             np_incr_dt = np.busday_offset(
 *                 np_dt, self.n, roll=roll, busdaycal=self.calendar             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_roll, __pyx_v_roll) < 0) __PYX_ERR(0, 3600, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_busdaycal, __pyx_v_self->__pyx_base.__pyx_base.calendar) < 0) __PYX_ERR(0, 3600, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3599
 *             np_dt = np.datetime64(date_in.date())
 * 
 *             np_incr_dt = np.busday_offset(             # <<<<<<<<<<<<<<
 *                 np_dt, self.n, roll=roll, busdaycal=self.calendar
 *             )
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_np_incr_dt = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3603
 *             )
 * 
 *             dt_date = np_incr_dt.astype(datetime)             # <<<<<<<<<<<<<<
 *             result = datetime.combine(dt_date, date_in.time())
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_np_incr_dt, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_ptype_7cpython_8datetime_datetime)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_ptype_7cpython_8datetime_datetime));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_dt_date = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3604
 * 
 *             dt_date = np_incr_dt.astype(datetime)
 *             result = datetime.combine(dt_date, date_in.time())             # <<<<<<<<<<<<<<
 * 
 *             if self.offset:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7cpython_8datetime_datetime), __pyx_n_s_combine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_date_in, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_dt_date, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3604, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_dt_date, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3604, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_dt_date);
      __Pyx_GIVEREF(__pyx_v_dt_date);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_dt_date);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_result = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3606
 *             result = datetime.combine(dt_date, date_in.time())
 * 
 *             if self.offset:             # <<<<<<<<<<<<<<
 *                 result = result + self.offset
 *             return result
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":3607
 * 
 *             if self.offset:
 *                 result = result + self.offset             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3606
 *             result = datetime.combine(dt_date, date_in.time())
 * 
 *             if self.offset:             # <<<<<<<<<<<<<<
 *                 result = result + self.offset
 *             return result
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3608
 *             if self.offset:
 *                 result = result + self.offset
 *             return result             # <<<<<<<<<<<<<<
 * 
 *         elif is_any_td_scalar(other):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3595
 *             roll = "backward"
 * 
 *         if PyDateTime_Check(other):             # <<<<<<<<<<<<<<
 *             date_in = other
 *             np_dt = np.datetime64(date_in.date())
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3610
 *             return result
 * 
 *         elif is_any_td_scalar(other):             # <<<<<<<<<<<<<<
 *             td = Timedelta(self.offset) + other
 *             return BDay(self.n, offset=td.to_pytimedelta(), normalize=self.normalize)
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_10timedeltas_is_any_td_scalar(__pyx_v_other) != 0);
  if (likely(__pyx_t_1)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3611
 * 
 *         elif is_any_td_scalar(other):
 *             td = Timedelta(self.offset) + other             # <<<<<<<<<<<<<<
 *             return BDay(self.n, offset=td.to_pytimedelta(), normalize=self.normalize)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_td = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3612
 *         elif is_any_td_scalar(other):
 *             td = Timedelta(self.offset) + other
 *             return BDay(self.n, offset=td.to_pytimedelta(), normalize=self.normalize)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ApplyTypeError(
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_BDay); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_to_pytimedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_offset_2, __pyx_t_3) < 0) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.normalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalize, __pyx_t_3) < 0) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3610
 *             return result
 * 
 *         elif is_any_td_scalar(other):             # <<<<<<<<<<<<<<
 *             td = Timedelta(self.offset) + other
 *             return BDay(self.n, offset=td.to_pytimedelta(), normalize=self.normalize)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3614
 *             return BDay(self.n, offset=td.to_pytimedelta(), normalize=self.normalize)
 *         else:
 *             raise ApplyTypeError(             # <<<<<<<<<<<<<<
 *                 "Only know how to combine trading day with "
 *                 "datetime, datetime64 or timedelta."
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ApplyTypeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_kp_u_Only_know_how_to_combine_trading) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Only_know_how_to_combine_trading);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3614, __pyx_L1_error)
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3589
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if self.n <= 0:
 *             roll = "forward"
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessDay._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_roll);
  __Pyx_XDECREF(__pyx_v_date_in);
  __Pyx_XDECREF(__pyx_v_np_dt);
  __Pyx_XDECREF(__pyx_v_np_incr_dt);
  __Pyx_XDECREF(__pyx_v_dt_date);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3619
 *             )
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_7is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_7is_on_offset(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_on_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 1, "dt", 0))) __PYX_ERR(0, 3619, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_6is_on_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_dt));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_6is_on_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_v_day64 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_on_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3620
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         day64 = _to_dt64D(dt)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.normalize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_7offsets__is_normalized(__pyx_v_dt) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3621
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):
 *             return False             # <<<<<<<<<<<<<<
 *         day64 = _to_dt64D(dt)
 *         return np.is_busday(day64, busdaycal=self.calendar)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3620
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 *         if self.normalize and not _is_normalized(dt):             # <<<<<<<<<<<<<<
 *             return False
 *         day64 = _to_dt64D(dt)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3622
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 *         day64 = _to_dt64D(dt)             # <<<<<<<<<<<<<<
 *         return np.is_busday(day64, busdaycal=self.calendar)
 * 
 */
  __pyx_t_3 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__to_dt64D(((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_day64 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3623
 *             return False
 *         day64 = _to_dt64D(dt)
 *         return np.is_busday(day64, busdaycal=self.calendar)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_busday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_day64);
  __Pyx_GIVEREF(__pyx_v_day64);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_day64);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_busdaycal, __pyx_v_self->__pyx_base.__pyx_base.calendar) < 0) __PYX_ERR(0, 3623, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3619
 *             )
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:             # <<<<<<<<<<<<<<
 *         if self.normalize and not _is_normalized(dt):
 *             return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessDay.is_on_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_day64);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3656
 *     )
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_18CustomBusinessHour_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_18CustomBusinessHour_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekmask = 0;
  PyObject *__pyx_v_holidays = 0;
  PyObject *__pyx_v_calendar = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_v_offset = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekmask,&__pyx_n_s_holidays,&__pyx_n_s_calendar,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_offset_2,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);

    /* "pandas/_libs/tslibs/offsets.pyx":3659
 *         self,
 *         n=1,
 *         normalize=False,             # <<<<<<<<<<<<<<
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,
 */
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_kp_u_Mon_Tue_Wed_Thu_Fri);

    /* "pandas/_libs/tslibs/offsets.pyx":3661
 *         normalize=False,
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,             # <<<<<<<<<<<<<<
 *         calendar=None,
 *         start="09:00",
 */
    values[3] = ((PyObject *)Py_None);

    /* "pandas/_libs/tslibs/offsets.pyx":3662
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,
 *         calendar=None,             # <<<<<<<<<<<<<<
 *         start="09:00",
 *         end="17:00",
 */
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)__pyx_kp_u_09_00);
    values[6] = ((PyObject *)__pyx_kp_u_17_00);
    values[7] = __pyx_k__57;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekmask);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_holidays);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calendar);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3656, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekmask = values[2];
    __pyx_v_holidays = values[3];
    __pyx_v_calendar = values[4];
    __pyx_v_start = values[5];
    __pyx_v_end = values[6];
    __pyx_v_offset = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3656, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessHour.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_18CustomBusinessHour___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, __pyx_v_start, __pyx_v_end, __pyx_v_offset);

  /* "pandas/_libs/tslibs/offsets.pyx":3656
 *     )
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_18CustomBusinessHour___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_offset) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3667
 *         offset=timedelta(0),
 *     ):
 *         BusinessHour.__init__(self, n, normalize, start=start, end=end, offset=offset)             # <<<<<<<<<<<<<<
 *         self._init_custom(weekmask, holidays, calendar)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_n);
  __Pyx_GIVEREF(__pyx_v_n);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_n);
  __Pyx_INCREF(__pyx_v_normalize);
  __Pyx_GIVEREF(__pyx_v_normalize);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_normalize);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_start, __pyx_v_start) < 0) __PYX_ERR(0, 3667, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_end, __pyx_v_end) < 0) __PYX_ERR(0, 3667, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_offset_2, __pyx_v_offset) < 0) __PYX_ERR(0, 3667, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3668
 *     ):
 *         BusinessHour.__init__(self, n, normalize, start=start, end=end, offset=offset)
 *         self._init_custom(weekmask, holidays, calendar)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_custom(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3656
 *     )
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.CustomBusinessHour.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3698
 *     )
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

/* Python wrapper */
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weekmask = 0;
  PyObject *__pyx_v_holidays = 0;
  PyObject *__pyx_v_calendar = 0;
  PyObject *__pyx_v_offset = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_normalize,&__pyx_n_s_weekmask,&__pyx_n_s_holidays,&__pyx_n_s_calendar,&__pyx_n_s_offset_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_1);

    /* "pandas/_libs/tslibs/offsets.pyx":3701
 *         self,
 *         n=1,
 *         normalize=False,             # <<<<<<<<<<<<<<
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,
 */
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)__pyx_kp_u_Mon_Tue_Wed_Thu_Fri);

    /* "pandas/_libs/tslibs/offsets.pyx":3703
 *         normalize=False,
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,             # <<<<<<<<<<<<<<
 *         calendar=None,
 *         offset=timedelta(0),
 */
    values[3] = ((PyObject *)Py_None);

    /* "pandas/_libs/tslibs/offsets.pyx":3704
 *         weekmask="Mon Tue Wed Thu Fri",
 *         holidays=None,
 *         calendar=None,             # <<<<<<<<<<<<<<
 *         offset=timedelta(0),
 *     ):
 */
    values[4] = ((PyObject *)Py_None);
    values[5] = __pyx_k__58;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weekmask);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_holidays);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calendar);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3698, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_normalize = values[1];
    __pyx_v_weekmask = values[2];
    __pyx_v_holidays = values[3];
    __pyx_v_calendar = values[4];
    __pyx_v_offset = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3698, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._CustomBusinessMonth.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth___init__(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, __pyx_v_offset);

  /* "pandas/_libs/tslibs/offsets.pyx":3698
 *     )
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

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

static int __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth___init__(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weekmask, PyObject *__pyx_v_holidays, PyObject *__pyx_v_calendar, PyObject *__pyx_v_offset) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3707
 *         offset=timedelta(0),
 *     ):
 *         BusinessMixin.__init__(self, n, normalize, offset)             # <<<<<<<<<<<<<<
 *         self._init_custom(weekmask, holidays, calendar)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3707, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_n, __pyx_v_normalize, __pyx_v_offset};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3707, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n);
    __Pyx_INCREF(__pyx_v_normalize);
    __Pyx_GIVEREF(__pyx_v_normalize);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_normalize);
    __Pyx_INCREF(__pyx_v_offset);
    __Pyx_GIVEREF(__pyx_v_offset);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_offset);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3708
 *     ):
 *         BusinessMixin.__init__(self, n, normalize, offset)
 *         self._init_custom(weekmask, holidays, calendar)             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init_custom(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)__pyx_v_self), __pyx_v_weekmask, __pyx_v_holidays, __pyx_v_calendar, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3698
 *     )
 * 
 *     def __init__(             # <<<<<<<<<<<<<<
 *         self,
 *         n=1,
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._CustomBusinessMonth.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3711
 * 
 *     @cache_readonly
 *     def cbday_roll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Define default roll function to be called in apply method.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_3cbday_roll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_2cbday_roll[] = "\n        Define default roll function to be called in apply method.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_3cbday_roll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cbday_roll (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_2cbday_roll(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_2cbday_roll(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self) {
  PyObject *__pyx_v_cbday_kwds = NULL;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *__pyx_v_cbday = NULL;
  PyObject *__pyx_v_roll_func = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cbday_roll", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3715
 *         Define default roll function to be called in apply method.
 *         """
 *         cbday_kwds = self.kwds.copy()             # <<<<<<<<<<<<<<
 *         cbday_kwds['offset'] = timedelta(0)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cbday_kwds = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3716
 *         """
 *         cbday_kwds = self.kwds.copy()
 *         cbday_kwds['offset'] = timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *         cbday = CustomBusinessDay(n=1, normalize=False, **cbday_kwds)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_v_cbday_kwds, __pyx_n_u_offset_2, __pyx_t_1) < 0)) __PYX_ERR(0, 3716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3718
 *         cbday_kwds['offset'] = timedelta(0)
 * 
 *         cbday = CustomBusinessDay(n=1, normalize=False, **cbday_kwds)             # <<<<<<<<<<<<<<
 * 
 *         if self._prefix.endswith("S"):
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_n, __pyx_int_1) < 0) __PYX_ERR(0, 3718, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_normalize, Py_False) < 0) __PYX_ERR(0, 3718, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  if (unlikely(__pyx_v_cbday_kwds == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 3718, __pyx_L1_error)
  }
  if (__Pyx_MergeKeywords(__pyx_t_1, __pyx_v_cbday_kwds) < 0) __PYX_ERR(0, 3718, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cbday = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3720
 *         cbday = CustomBusinessDay(n=1, normalize=False, **cbday_kwds)
 * 
 *         if self._prefix.endswith("S"):             # <<<<<<<<<<<<<<
 *             # MonthBegin
 *             roll_func = cbday.rollforward
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_S) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_S);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":3722
 *         if self._prefix.endswith("S"):
 *             # MonthBegin
 *             roll_func = cbday.rollforward             # <<<<<<<<<<<<<<
 *         else:
 *             # MonthEnd
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cbday), __pyx_n_s_rollforward); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_roll_func = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3720
 *         cbday = CustomBusinessDay(n=1, normalize=False, **cbday_kwds)
 * 
 *         if self._prefix.endswith("S"):             # <<<<<<<<<<<<<<
 *             # MonthBegin
 *             roll_func = cbday.rollforward
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3725
 *         else:
 *             # MonthEnd
 *             roll_func = cbday.rollback             # <<<<<<<<<<<<<<
 *         return roll_func
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cbday), __pyx_n_s_rollback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_roll_func = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3726
 *             # MonthEnd
 *             roll_func = cbday.rollback
 *         return roll_func             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_roll_func);
  __pyx_r = __pyx_v_roll_func;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3711
 * 
 *     @cache_readonly
 *     def cbday_roll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Define default roll function to be called in apply method.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._CustomBusinessMonth.cbday_roll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cbday_kwds);
  __Pyx_XDECREF((PyObject *)__pyx_v_cbday);
  __Pyx_XDECREF(__pyx_v_roll_func);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3729
 * 
 *     @cache_readonly
 *     def m_offset(self):             # <<<<<<<<<<<<<<
 *         if self._prefix.endswith("S"):
 *             # MonthBegin
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_5m_offset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_5m_offset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("m_offset (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_4m_offset(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_4m_offset(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *__pyx_v_moff = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("m_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3730
 *     @cache_readonly
 *     def m_offset(self):
 *         if self._prefix.endswith("S"):             # <<<<<<<<<<<<<<
 *             # MonthBegin
 *             moff = MonthBegin(n=1, normalize=False)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_S) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_S);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":3732
 *         if self._prefix.endswith("S"):
 *             # MonthBegin
 *             moff = MonthBegin(n=1, normalize=False)             # <<<<<<<<<<<<<<
 *         else:
 *             # MonthEnd
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_n, __pyx_int_1) < 0) __PYX_ERR(0, 3732, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_normalize, Py_False) < 0) __PYX_ERR(0, 3732, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_moff = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3730
 *     @cache_readonly
 *     def m_offset(self):
 *         if self._prefix.endswith("S"):             # <<<<<<<<<<<<<<
 *             # MonthBegin
 *             moff = MonthBegin(n=1, normalize=False)
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3735
 *         else:
 *             # MonthEnd
 *             moff = MonthEnd(n=1, normalize=False)             # <<<<<<<<<<<<<<
 *         return moff
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_n, __pyx_int_1) < 0) __PYX_ERR(0, 3735, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_normalize, Py_False) < 0) __PYX_ERR(0, 3735, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_moff = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3736
 *             # MonthEnd
 *             moff = MonthEnd(n=1, normalize=False)
 *         return moff             # <<<<<<<<<<<<<<
 * 
 *     @cache_readonly
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_moff));
  __pyx_r = ((PyObject *)__pyx_v_moff);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3729
 * 
 *     @cache_readonly
 *     def m_offset(self):             # <<<<<<<<<<<<<<
 *         if self._prefix.endswith("S"):
 *             # MonthBegin
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._CustomBusinessMonth.m_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_moff);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3739
 * 
 *     @cache_readonly
 *     def month_roll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Define default roll function to be called in apply method.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_7month_roll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_6month_roll[] = "\n        Define default roll function to be called in apply method.\n        ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_7month_roll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("month_roll (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_6month_roll(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_6month_roll(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self) {
  PyObject *__pyx_v_roll_func = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("month_roll", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3743
 *         Define default roll function to be called in apply method.
 *         """
 *         if self._prefix.endswith("S"):             # <<<<<<<<<<<<<<
 *             # MonthBegin
 *             roll_func = self.m_offset.rollback
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_S) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_S);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":3745
 *         if self._prefix.endswith("S"):
 *             # MonthBegin
 *             roll_func = self.m_offset.rollback             # <<<<<<<<<<<<<<
 *         else:
 *             # MonthEnd
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_m_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rollback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_roll_func = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3743
 *         Define default roll function to be called in apply method.
 *         """
 *         if self._prefix.endswith("S"):             # <<<<<<<<<<<<<<
 *             # MonthBegin
 *             roll_func = self.m_offset.rollback
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3748
 *         else:
 *             # MonthEnd
 *             roll_func = self.m_offset.rollforward             # <<<<<<<<<<<<<<
 *         return roll_func
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_m_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rollforward); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_roll_func = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3749
 *             # MonthEnd
 *             roll_func = self.m_offset.rollforward
 *         return roll_func             # <<<<<<<<<<<<<<
 * 
 *     @apply_wraps
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_roll_func);
  __pyx_r = __pyx_v_roll_func;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3739
 * 
 *     @cache_readonly
 *     def month_roll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Define default roll function to be called in apply method.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._CustomBusinessMonth.month_roll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_roll_func);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3752
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # First move to month offset
 *         cur_month_offset_date = self.month_roll(other)
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_9_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_9_apply(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 3752, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_8_apply(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)__pyx_v_self), ((PyDateTime_DateTime *)__pyx_v_other));

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_8_apply(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other) {
  PyObject *__pyx_v_cur_month_offset_date = NULL;
  PyObject *__pyx_v_compare_date = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_new = NULL;
  PyObject *__pyx_v_result = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_apply", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3754
 *     def _apply(self, other: datetime) -> datetime:
 *         # First move to month offset
 *         cur_month_offset_date = self.month_roll(other)             # <<<<<<<<<<<<<<
 * 
 *         # Find this custom month offset
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_month_roll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_other));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_cur_month_offset_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3757
 * 
 *         # Find this custom month offset
 *         compare_date = self.cbday_roll(cur_month_offset_date)             # <<<<<<<<<<<<<<
 *         n = roll_convention(other.day, self.n, compare_date.day)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cbday_roll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cur_month_offset_date) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cur_month_offset_date);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_compare_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3758
 *         # Find this custom month offset
 *         compare_date = self.cbday_roll(cur_month_offset_date)
 *         n = roll_convention(other.day, self.n, compare_date.day)             # <<<<<<<<<<<<<<
 * 
 *         new = cur_month_offset_date + n * self.m_offset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_compare_date, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.n, __pyx_t_5, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3760
 *         n = roll_convention(other.day, self.n, compare_date.day)
 * 
 *         new = cur_month_offset_date + n * self.m_offset             # <<<<<<<<<<<<<<
 *         result = self.cbday_roll(new)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_m_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_n, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_v_cur_month_offset_date, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_new = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3761
 * 
 *         new = cur_month_offset_date + n * self.m_offset
 *         result = self.cbday_roll(new)             # <<<<<<<<<<<<<<
 * 
 *         if self.offset:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cbday_roll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_new) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3763
 *         result = self.cbday_roll(new)
 * 
 *         if self.offset:             # <<<<<<<<<<<<<<
 *             result = result + self.offset
 *         return result
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":3764
 * 
 *         if self.offset:
 *             result = result + self.offset             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3763
 *         result = self.cbday_roll(new)
 * 
 *         if self.offset:             # <<<<<<<<<<<<<<
 *             result = result + self.offset
 *         return result
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3765
 *         if self.offset:
 *             result = result + self.offset
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_v_result);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3752
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # First move to month offset
 *         cur_month_offset_date = self.month_roll(other)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._CustomBusinessMonth._apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cur_month_offset_date);
  __Pyx_XDECREF(__pyx_v_compare_date);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_new);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3858
 * 
 * # TODO: better name?
 * def _get_offset(name: str) -> BaseOffset:             # <<<<<<<<<<<<<<
 *     """
 *     Return DateOffset object associated with rule name.
 */

/* Python wrapper */
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_9_get_offset(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_8_get_offset[] = "\n    Return DateOffset object associated with rule name.\n\n    Examples\n    --------\n    _get_offset('EOM') --> BMonthEnd(1)\n    ";
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_9_get_offset = {"_get_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_9_get_offset, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_8_get_offset};
static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_9_get_offset(PyObject *__pyx_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_offset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 3858, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_8_get_offset(__pyx_self, ((PyObject*)__pyx_v_name));

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

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_8_get_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_split = NULL;
  PyObject *__pyx_v_klass = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_offset", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "pandas/_libs/tslibs/offsets.pyx":3866
 *     _get_offset('EOM') --> BMonthEnd(1)
 *     """
 *     if name not in _dont_uppercase:             # <<<<<<<<<<<<<<
 *         name = name.upper()
 *         name = _lite_rule_alias.get(name, name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_dont_uppercase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":3867
 *     """
 *     if name not in _dont_uppercase:
 *         name = name.upper()             # <<<<<<<<<<<<<<
 *         name = _lite_rule_alias.get(name, name)
 *         name = _lite_rule_alias.get(name.lower(), name)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3868
 *     if name not in _dont_uppercase:
 *         name = name.upper()
 *         name = _lite_rule_alias.get(name, name)             # <<<<<<<<<<<<<<
 *         name = _lite_rule_alias.get(name.lower(), name)
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_lite_rule_alias); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3868, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3868, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_name);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 3868, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3869
 *         name = name.upper()
 *         name = _lite_rule_alias.get(name, name)
 *         name = _lite_rule_alias.get(name.lower(), name)             # <<<<<<<<<<<<<<
 *     else:
 *         name = _lite_rule_alias.get(name, name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_lite_rule_alias); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_t_5);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_v_name);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 3869, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3866
 *     _get_offset('EOM') --> BMonthEnd(1)
 *     """
 *     if name not in _dont_uppercase:             # <<<<<<<<<<<<<<
 *         name = name.upper()
 *         name = _lite_rule_alias.get(name, name)
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3871
 *         name = _lite_rule_alias.get(name.lower(), name)
 *     else:
 *         name = _lite_rule_alias.get(name, name)             # <<<<<<<<<<<<<<
 * 
 *     if name not in _offset_map:
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_lite_rule_alias); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_name, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_name, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_name);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_name);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 3871, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":3873
 *         name = _lite_rule_alias.get(name, name)
 * 
 *     if name not in _offset_map:             # <<<<<<<<<<<<<<
 *         try:
 *             split = name.split("-")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_offset_map); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":3874
 * 
 *     if name not in _offset_map:
 *         try:             # <<<<<<<<<<<<<<
 *             split = name.split("-")
 *             klass = prefix_mapping[split[0]]
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":3875
 *     if name not in _offset_map:
 *         try:
 *             split = name.split("-")             # <<<<<<<<<<<<<<
 *             klass = prefix_mapping[split[0]]
 *             # handles case where there's no suffix (and will TypeError if too
 */
        if (unlikely(__pyx_v_name == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split");
          __PYX_ERR(0, 3875, __pyx_L5_error)
        }
        __pyx_t_1 = PyUnicode_Split(__pyx_v_name, __pyx_kp_u__39, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3875, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_split = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3876
 *         try:
 *             split = name.split("-")
 *             klass = prefix_mapping[split[0]]             # <<<<<<<<<<<<<<
 *             # handles case where there's no suffix (and will TypeError if too
 *             # many '-')
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_prefix_mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3876, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3876, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3876, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_klass = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3879
 *             # handles case where there's no suffix (and will TypeError if too
 *             # many '-')
 *             offset = klass._from_name(*split[1:])             # <<<<<<<<<<<<<<
 *         except (ValueError, TypeError, KeyError) as err:
 *             # bad prefix or suffix
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_klass, __pyx_n_s_from_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3879, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_split, 1, 0, NULL, NULL, &__pyx_slice__53, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3879, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3879, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3879, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_offset = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3874
 * 
 *     if name not in _offset_map:
 *         try:             # <<<<<<<<<<<<<<
 *             split = name.split("-")
 *             klass = prefix_mapping[split[0]]
 */
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L10_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3880
 *             # many '-')
 *             offset = klass._from_name(*split[1:])
 *         except (ValueError, TypeError, KeyError) as err:             # <<<<<<<<<<<<<<
 *             # bad prefix or suffix
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(name)) from err
 */
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("pandas._libs.tslibs.offsets._get_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 3880, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_err = __pyx_t_1;
        /*try:*/ {

          /* "pandas/_libs/tslibs/offsets.pyx":3882
 *         except (ValueError, TypeError, KeyError) as err:
 *             # bad prefix or suffix
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(name)) from err             # <<<<<<<<<<<<<<
 *         # cache
 *         _offset_map[name] = offset
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_INVALID_FREQ_ERR_MSG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3882, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3882, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
            }
          }
          __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_name);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3882, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3882, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_Raise(__pyx_t_12, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __PYX_ERR(0, 3882, __pyx_L16_error)
        }

        /* "pandas/_libs/tslibs/offsets.pyx":3880
 *             # many '-')
 *             offset = klass._from_name(*split[1:])
 *         except (ValueError, TypeError, KeyError) as err:             # <<<<<<<<<<<<<<
 *             # bad prefix or suffix
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(name)) from err
 */
        /*finally:*/ {
          __pyx_L16_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __pyx_t_6 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err);
              __pyx_v_err = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
            }
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
            __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
            __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
            goto __pyx_L7_except_error;
          }
        }
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "pandas/_libs/tslibs/offsets.pyx":3874
 * 
 *     if name not in _offset_map:
 *         try:             # <<<<<<<<<<<<<<
 *             split = name.split("-")
 *             klass = prefix_mapping[split[0]]
 */
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L1_error;
      __pyx_L10_try_end:;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3884
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(name)) from err
 *         # cache
 *         _offset_map[name] = offset             # <<<<<<<<<<<<<<
 * 
 *     return _offset_map[name]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_offset_map); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_offset) < 0)) __PYX_ERR(0, 3884, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3873
 *         name = _lite_rule_alias.get(name, name)
 * 
 *     if name not in _offset_map:             # <<<<<<<<<<<<<<
 *         try:
 *             split = name.split("-")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3886
 *         _offset_map[name] = offset
 * 
 *     return _offset_map[name]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_offset_map); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset))))) __PYX_ERR(0, 3886, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3858
 * 
 * # TODO: better name?
 * def _get_offset(name: str) -> BaseOffset:             # <<<<<<<<<<<<<<
 *     """
 *     Return DateOffset object associated with rule name.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._get_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_split);
  __Pyx_XDECREF(__pyx_v_klass);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3889
 * 
 * 
 * cpdef to_offset(freq):             # <<<<<<<<<<<<<<
 *     """
 *     Return DateOffset object from string or datetime.timedelta object.
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11to_offset(PyObject *__pyx_self, PyObject *__pyx_v_freq); /*proto*/
static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_to_offset(PyObject *__pyx_v_freq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_v_stride_sign = NULL;
  PyObject *__pyx_v_split = NULL;
  PyObject *__pyx_v_tups = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_sep = NULL;
  PyObject *__pyx_v_stride = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_v_off = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *(*__pyx_t_17)(PyObject *);
  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("to_offset", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":3930
 *     <Hour>
 *     """
 *     if freq is None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = (__pyx_v_freq == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":3931
 *     """
 *     if freq is None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(freq, BaseOffset):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3930
 *     <Hour>
 *     """
 *     if freq is None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3933
 *         return None
 * 
 *     if isinstance(freq, BaseOffset):             # <<<<<<<<<<<<<<
 *         return freq
 * 
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_freq, __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3934
 * 
 *     if isinstance(freq, BaseOffset):
 *         return freq             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(freq, tuple):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_freq);
    __pyx_r = __pyx_v_freq;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3933
 *         return None
 * 
 *     if isinstance(freq, BaseOffset):             # <<<<<<<<<<<<<<
 *         return freq
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3936
 *         return freq
 * 
 *     if isinstance(freq, tuple):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             f"to_offset does not support tuples {freq}, pass as a string instead"
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_freq); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3938
 *     if isinstance(freq, tuple):
 *         raise TypeError(
 *             f"to_offset does not support tuples {freq}, pass as a string instead"             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_to_offset_does_not_support_tuple);
    __pyx_t_4 += 34;
    __Pyx_GIVEREF(__pyx_kp_u_to_offset_does_not_support_tuple);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_to_offset_does_not_support_tuple);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_freq, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_pass_as_a_string_instead);
    __pyx_t_4 += 26;
    __Pyx_GIVEREF(__pyx_kp_u_pass_as_a_string_instead);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_pass_as_a_string_instead);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/_libs/tslibs/offsets.pyx":3937
 * 
 *     if isinstance(freq, tuple):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             f"to_offset does not support tuples {freq}, pass as a string instead"
 *         )
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3937, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3936
 *         return freq
 * 
 *     if isinstance(freq, tuple):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             f"to_offset does not support tuples {freq}, pass as a string instead"
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3941
 *         )
 * 
 *     elif PyDelta_Check(freq):             # <<<<<<<<<<<<<<
 *         return delta_to_tick(freq)
 * 
 */
  __pyx_t_2 = (PyDelta_Check(__pyx_v_freq) != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":3942
 * 
 *     elif PyDelta_Check(freq):
 *         return delta_to_tick(freq)             # <<<<<<<<<<<<<<
 * 
 *     elif isinstance(freq, str):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_delta_to_tick); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_freq) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_freq);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":3941
 *         )
 * 
 *     elif PyDelta_Check(freq):             # <<<<<<<<<<<<<<
 *         return delta_to_tick(freq)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3944
 *         return delta_to_tick(freq)
 * 
 *     elif isinstance(freq, str):             # <<<<<<<<<<<<<<
 *         delta = None
 *         stride_sign = None
 */
  __pyx_t_2 = PyUnicode_Check(__pyx_v_freq); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":3945
 * 
 *     elif isinstance(freq, str):
 *         delta = None             # <<<<<<<<<<<<<<
 *         stride_sign = None
 * 
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_delta = Py_None;

    /* "pandas/_libs/tslibs/offsets.pyx":3946
 *     elif isinstance(freq, str):
 *         delta = None
 *         stride_sign = None             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_stride_sign = Py_None;

    /* "pandas/_libs/tslibs/offsets.pyx":3948
 *         stride_sign = None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             split = opattern.split(freq)
 *             if split[-1] != "" and not split[-1].isspace():
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":3949
 * 
 *         try:
 *             split = opattern.split(freq)             # <<<<<<<<<<<<<<
 *             if split[-1] != "" and not split[-1].isspace():
 *                 # the last element must be blank
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opattern); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3949, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3949, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_freq) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_freq);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3949, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_split = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3950
 *         try:
 *             split = opattern.split(freq)
 *             if split[-1] != "" and not split[-1].isspace():             # <<<<<<<<<<<<<<
 *                 # the last element must be blank
 *                 raise ValueError("last element must be blank")
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_split, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3950, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__14, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3950, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_2) {
        } else {
          __pyx_t_1 = __pyx_t_2;
          goto __pyx_L13_bool_binop_done;
        }
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_split, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3950, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isspace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3950, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3950, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3950, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11 = ((!__pyx_t_2) != 0);
        __pyx_t_1 = __pyx_t_11;
        __pyx_L13_bool_binop_done:;
        if (unlikely(__pyx_t_1)) {

          /* "pandas/_libs/tslibs/offsets.pyx":3952
 *             if split[-1] != "" and not split[-1].isspace():
 *                 # the last element must be blank
 *                 raise ValueError("last element must be blank")             # <<<<<<<<<<<<<<
 * 
 *             tups = zip(split[0::4], split[1::4], split[2::4])
 */
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3952, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(0, 3952, __pyx_L6_error)

          /* "pandas/_libs/tslibs/offsets.pyx":3950
 *         try:
 *             split = opattern.split(freq)
 *             if split[-1] != "" and not split[-1].isspace():             # <<<<<<<<<<<<<<
 *                 # the last element must be blank
 *                 raise ValueError("last element must be blank")
 */
        }

        /* "pandas/_libs/tslibs/offsets.pyx":3954
 *                 raise ValueError("last element must be blank")
 * 
 *             tups = zip(split[0::4], split[1::4], split[2::4])             # <<<<<<<<<<<<<<
 *             for n, (sep, stride, name) in enumerate(tups):
 *                 if sep != "" and not sep.isspace():
 */
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_split, __pyx_slice__60); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3954, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_split, __pyx_slice__61); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3954, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_split, __pyx_slice__62); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3954, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3954, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_7);
        __pyx_t_3 = 0;
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3954, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_tups = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3955
 * 
 *             tups = zip(split[0::4], split[1::4], split[2::4])
 *             for n, (sep, stride, name) in enumerate(tups):             # <<<<<<<<<<<<<<
 *                 if sep != "" and not sep.isspace():
 *                     raise ValueError("separator must be spaces")
 */
        __Pyx_INCREF(__pyx_int_0);
        __pyx_t_7 = __pyx_int_0;
        if (likely(PyList_CheckExact(__pyx_v_tups)) || PyTuple_CheckExact(__pyx_v_tups)) {
          __pyx_t_12 = __pyx_v_tups; __Pyx_INCREF(__pyx_t_12); __pyx_t_4 = 0;
          __pyx_t_13 = NULL;
        } else {
          __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_tups); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3955, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3955, __pyx_L6_error)
        }
        for (;;) {
          if (likely(!__pyx_t_13)) {
            if (likely(PyList_CheckExact(__pyx_t_12))) {
              if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3955, __pyx_L6_error)
              #else
              __pyx_t_6 = PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3955, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            } else {
              if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3955, __pyx_L6_error)
              #else
              __pyx_t_6 = PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3955, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            }
          } else {
            __pyx_t_6 = __pyx_t_13(__pyx_t_12);
            if (unlikely(!__pyx_t_6)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 3955, __pyx_L6_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_6);
          }
          if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
            PyObject* sequence = __pyx_t_6;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 3)) {
              if (size > 3) __Pyx_RaiseTooManyValuesError(3);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 3955, __pyx_L6_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_15 = PyTuple_GET_ITEM(sequence, 2); 
            } else {
              __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_14 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_15 = PyList_GET_ITEM(sequence, 2); 
            }
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_15);
            #else
            __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3955, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3955, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_15 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3955, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            #endif
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_16 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3955, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_17 = Py_TYPE(__pyx_t_16)->tp_iternext;
            index = 0; __pyx_t_3 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            index = 1; __pyx_t_14 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_14)) goto __pyx_L17_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_14);
            index = 2; __pyx_t_15 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L17_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_15);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 3) < 0) __PYX_ERR(0, 3955, __pyx_L6_error)
            __pyx_t_17 = NULL;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            goto __pyx_L18_unpacking_done;
            __pyx_L17_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_17 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 3955, __pyx_L6_error)
            __pyx_L18_unpacking_done:;
          }
          __Pyx_XDECREF_SET(__pyx_v_sep, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_stride, __pyx_t_14);
          __pyx_t_14 = 0;
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_15);
          __pyx_t_15 = 0;
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_7);
          __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3955, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7);
          __pyx_t_7 = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "pandas/_libs/tslibs/offsets.pyx":3956
 *             tups = zip(split[0::4], split[1::4], split[2::4])
 *             for n, (sep, stride, name) in enumerate(tups):
 *                 if sep != "" and not sep.isspace():             # <<<<<<<<<<<<<<
 *                     raise ValueError("separator must be spaces")
 *                 prefix = _lite_rule_alias.get(name) or name
 */
          __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_sep, __pyx_kp_u__14, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3956, __pyx_L6_error)
          if (__pyx_t_11) {
          } else {
            __pyx_t_1 = __pyx_t_11;
            goto __pyx_L20_bool_binop_done;
          }
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_sep, __pyx_n_s_isspace); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3956, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_14 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
            }
          }
          __pyx_t_6 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3956, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3956, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_2 = ((!__pyx_t_11) != 0);
          __pyx_t_1 = __pyx_t_2;
          __pyx_L20_bool_binop_done:;
          if (unlikely(__pyx_t_1)) {

            /* "pandas/_libs/tslibs/offsets.pyx":3957
 *             for n, (sep, stride, name) in enumerate(tups):
 *                 if sep != "" and not sep.isspace():
 *                     raise ValueError("separator must be spaces")             # <<<<<<<<<<<<<<
 *                 prefix = _lite_rule_alias.get(name) or name
 *                 if stride_sign is None:
 */
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3957, __pyx_L6_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, 3957, __pyx_L6_error)

            /* "pandas/_libs/tslibs/offsets.pyx":3956
 *             tups = zip(split[0::4], split[1::4], split[2::4])
 *             for n, (sep, stride, name) in enumerate(tups):
 *                 if sep != "" and not sep.isspace():             # <<<<<<<<<<<<<<
 *                     raise ValueError("separator must be spaces")
 *                 prefix = _lite_rule_alias.get(name) or name
 */
          }

          /* "pandas/_libs/tslibs/offsets.pyx":3958
 *                 if sep != "" and not sep.isspace():
 *                     raise ValueError("separator must be spaces")
 *                 prefix = _lite_rule_alias.get(name) or name             # <<<<<<<<<<<<<<
 *                 if stride_sign is None:
 *                     stride_sign = -1 if stride.startswith("-") else 1
 */
          __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_lite_rule_alias); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3958, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3958, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_15 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_14, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3958, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3958, __pyx_L6_error)
          if (!__pyx_t_1) {
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          } else {
            __Pyx_INCREF(__pyx_t_15);
            __pyx_t_6 = __pyx_t_15;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            goto __pyx_L22_bool_binop_done;
          }
          __Pyx_INCREF(__pyx_v_name);
          __pyx_t_6 = __pyx_v_name;
          __pyx_L22_bool_binop_done:;
          __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "pandas/_libs/tslibs/offsets.pyx":3959
 *                     raise ValueError("separator must be spaces")
 *                 prefix = _lite_rule_alias.get(name) or name
 *                 if stride_sign is None:             # <<<<<<<<<<<<<<
 *                     stride_sign = -1 if stride.startswith("-") else 1
 *                 if not stride:
 */
          __pyx_t_1 = (__pyx_v_stride_sign == Py_None);
          __pyx_t_2 = (__pyx_t_1 != 0);
          if (__pyx_t_2) {

            /* "pandas/_libs/tslibs/offsets.pyx":3960
 *                 prefix = _lite_rule_alias.get(name) or name
 *                 if stride_sign is None:
 *                     stride_sign = -1 if stride.startswith("-") else 1             # <<<<<<<<<<<<<<
 *                 if not stride:
 *                     stride = 1
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3960, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_14 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_14)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_14);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            __pyx_t_15 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_14, __pyx_kp_u__39) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__39);
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3960, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3960, __pyx_L6_error)
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (__pyx_t_2) {
              __Pyx_INCREF(__pyx_int_neg_1);
              __pyx_t_6 = __pyx_int_neg_1;
            } else {
              __Pyx_INCREF(__pyx_int_1);
              __pyx_t_6 = __pyx_int_1;
            }
            __Pyx_DECREF_SET(__pyx_v_stride_sign, __pyx_t_6);
            __pyx_t_6 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":3959
 *                     raise ValueError("separator must be spaces")
 *                 prefix = _lite_rule_alias.get(name) or name
 *                 if stride_sign is None:             # <<<<<<<<<<<<<<
 *                     stride_sign = -1 if stride.startswith("-") else 1
 *                 if not stride:
 */
          }

          /* "pandas/_libs/tslibs/offsets.pyx":3961
 *                 if stride_sign is None:
 *                     stride_sign = -1 if stride.startswith("-") else 1
 *                 if not stride:             # <<<<<<<<<<<<<<
 *                     stride = 1
 * 
 */
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_stride); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3961, __pyx_L6_error)
          __pyx_t_1 = ((!__pyx_t_2) != 0);
          if (__pyx_t_1) {

            /* "pandas/_libs/tslibs/offsets.pyx":3962
 *                     stride_sign = -1 if stride.startswith("-") else 1
 *                 if not stride:
 *                     stride = 1             # <<<<<<<<<<<<<<
 * 
 *                 if prefix in {"D", "H", "T", "S", "L", "U", "N"}:
 */
            __Pyx_INCREF(__pyx_int_1);
            __Pyx_DECREF_SET(__pyx_v_stride, __pyx_int_1);

            /* "pandas/_libs/tslibs/offsets.pyx":3961
 *                 if stride_sign is None:
 *                     stride_sign = -1 if stride.startswith("-") else 1
 *                 if not stride:             # <<<<<<<<<<<<<<
 *                     stride = 1
 * 
 */
          }

          /* "pandas/_libs/tslibs/offsets.pyx":3964
 *                     stride = 1
 * 
 *                 if prefix in {"D", "H", "T", "S", "L", "U", "N"}:             # <<<<<<<<<<<<<<
 *                     # For these prefixes, we have something like "3H" or
 *                     #  "2.5T", so we can construct a Timedelta with the
 */
          __Pyx_INCREF(__pyx_v_prefix);
          __pyx_t_6 = __pyx_v_prefix;
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L27_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_H, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L27_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_T, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L27_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L27_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_L, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L27_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_U, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L27_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3964, __pyx_L6_error)
          __pyx_t_1 = __pyx_t_2;
          __pyx_L27_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_2 = (__pyx_t_1 != 0);
          if (__pyx_t_2) {

            /* "pandas/_libs/tslibs/offsets.pyx":3968
 *                     #  "2.5T", so we can construct a Timedelta with the
 *                     #  matching unit and get our offset from delta_to_tick
 *                     td = Timedelta(1, unit=prefix)             # <<<<<<<<<<<<<<
 *                     off = delta_to_tick(td)
 *                     offset = off * float(stride)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3968, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3968, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_unit, __pyx_v_prefix) < 0) __PYX_ERR(0, 3968, __pyx_L6_error)
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__23, __pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3968, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_3);
            __pyx_t_3 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":3969
 *                     #  matching unit and get our offset from delta_to_tick
 *                     td = Timedelta(1, unit=prefix)
 *                     off = delta_to_tick(td)             # <<<<<<<<<<<<<<
 *                     offset = off * float(stride)
 *                     if n != 0:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_delta_to_tick); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3969, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_15, function);
              }
            }
            __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_6, __pyx_v_td) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_td);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3969, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF_SET(__pyx_v_off, __pyx_t_3);
            __pyx_t_3 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":3970
 *                     td = Timedelta(1, unit=prefix)
 *                     off = delta_to_tick(td)
 *                     offset = off * float(stride)             # <<<<<<<<<<<<<<
 *                     if n != 0:
 *                         # If n==0, then stride_sign is already incorporated
 */
            __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_v_stride); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3970, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_15 = PyNumber_Multiply(__pyx_v_off, __pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3970, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_v_offset, __pyx_t_15);
            __pyx_t_15 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":3971
 *                     off = delta_to_tick(td)
 *                     offset = off * float(stride)
 *                     if n != 0:             # <<<<<<<<<<<<<<
 *                         # If n==0, then stride_sign is already incorporated
 *                         #  into the offset
 */
            __pyx_t_15 = __Pyx_PyInt_NeObjC(__pyx_v_n, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3971, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3971, __pyx_L6_error)
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (__pyx_t_2) {

              /* "pandas/_libs/tslibs/offsets.pyx":3974
 *                         # If n==0, then stride_sign is already incorporated
 *                         #  into the offset
 *                         offset *= stride_sign             # <<<<<<<<<<<<<<
 *                 else:
 *                     stride = int(stride)
 */
              __pyx_t_15 = PyNumber_InPlaceMultiply(__pyx_v_offset, __pyx_v_stride_sign); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3974, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_15);
              __pyx_t_15 = 0;

              /* "pandas/_libs/tslibs/offsets.pyx":3971
 *                     off = delta_to_tick(td)
 *                     offset = off * float(stride)
 *                     if n != 0:             # <<<<<<<<<<<<<<
 *                         # If n==0, then stride_sign is already incorporated
 *                         #  into the offset
 */
            }

            /* "pandas/_libs/tslibs/offsets.pyx":3964
 *                     stride = 1
 * 
 *                 if prefix in {"D", "H", "T", "S", "L", "U", "N"}:             # <<<<<<<<<<<<<<
 *                     # For these prefixes, we have something like "3H" or
 *                     #  "2.5T", so we can construct a Timedelta with the
 */
            goto __pyx_L26;
          }

          /* "pandas/_libs/tslibs/offsets.pyx":3976
 *                         offset *= stride_sign
 *                 else:
 *                     stride = int(stride)             # <<<<<<<<<<<<<<
 *                     offset = _get_offset(name)
 *                     offset = offset * int(np.fabs(stride) * stride_sign)
 */
          /*else*/ {
            __pyx_t_15 = __Pyx_PyNumber_Int(__pyx_v_stride); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3976, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_15);
            __pyx_t_15 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":3977
 *                 else:
 *                     stride = int(stride)
 *                     offset = _get_offset(name)             # <<<<<<<<<<<<<<
 *                     offset = offset * int(np.fabs(stride) * stride_sign)
 * 
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3977, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            __pyx_t_15 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3977, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_v_offset, __pyx_t_15);
            __pyx_t_15 = 0;

            /* "pandas/_libs/tslibs/offsets.pyx":3978
 *                     stride = int(stride)
 *                     offset = _get_offset(name)
 *                     offset = offset * int(np.fabs(stride) * stride_sign)             # <<<<<<<<<<<<<<
 * 
 *                 if delta is None:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3978, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fabs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3978, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_15 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_stride) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_stride);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3978, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = PyNumber_Multiply(__pyx_t_15, __pyx_v_stride_sign); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3978, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __pyx_t_15 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3978, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = PyNumber_Multiply(__pyx_v_offset, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3978, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_6);
            __pyx_t_6 = 0;
          }
          __pyx_L26:;

          /* "pandas/_libs/tslibs/offsets.pyx":3980
 *                     offset = offset * int(np.fabs(stride) * stride_sign)
 * 
 *                 if delta is None:             # <<<<<<<<<<<<<<
 *                     delta = offset
 *                 else:
 */
          __pyx_t_2 = (__pyx_v_delta == Py_None);
          __pyx_t_1 = (__pyx_t_2 != 0);
          if (__pyx_t_1) {

            /* "pandas/_libs/tslibs/offsets.pyx":3981
 * 
 *                 if delta is None:
 *                     delta = offset             # <<<<<<<<<<<<<<
 *                 else:
 *                     delta = delta + offset
 */
            __Pyx_INCREF(__pyx_v_offset);
            __Pyx_DECREF_SET(__pyx_v_delta, __pyx_v_offset);

            /* "pandas/_libs/tslibs/offsets.pyx":3980
 *                     offset = offset * int(np.fabs(stride) * stride_sign)
 * 
 *                 if delta is None:             # <<<<<<<<<<<<<<
 *                     delta = offset
 *                 else:
 */
            goto __pyx_L35;
          }

          /* "pandas/_libs/tslibs/offsets.pyx":3983
 *                     delta = offset
 *                 else:
 *                     delta = delta + offset             # <<<<<<<<<<<<<<
 *         except (ValueError, TypeError) as err:
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(freq)) from err
 */
          /*else*/ {
            __pyx_t_6 = PyNumber_Add(__pyx_v_delta, __pyx_v_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3983, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF_SET(__pyx_v_delta, __pyx_t_6);
            __pyx_t_6 = 0;
          }
          __pyx_L35:;

          /* "pandas/_libs/tslibs/offsets.pyx":3955
 * 
 *             tups = zip(split[0::4], split[1::4], split[2::4])
 *             for n, (sep, stride, name) in enumerate(tups):             # <<<<<<<<<<<<<<
 *                 if sep != "" and not sep.isspace():
 *                     raise ValueError("separator must be spaces")
 */
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pandas/_libs/tslibs/offsets.pyx":3948
 *         stride_sign = None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             split = opattern.split(freq)
 *             if split[-1] != "" and not split[-1].isspace():
 */
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L11_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3984
 *                 else:
 *                     delta = delta + offset
 *         except (ValueError, TypeError) as err:             # <<<<<<<<<<<<<<
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(freq)) from err
 *     else:
 */
      __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_18) {
        __Pyx_AddTraceback("pandas._libs.tslibs.offsets.to_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_6) < 0) __PYX_ERR(0, 3984, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_v_err = __pyx_t_12;
        /*try:*/ {

          /* "pandas/_libs/tslibs/offsets.pyx":3985
 *                     delta = delta + offset
 *         except (ValueError, TypeError) as err:
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(freq)) from err             # <<<<<<<<<<<<<<
 *     else:
 *         delta = None
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_INVALID_FREQ_ERR_MSG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3985, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3985, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_14, function);
            }
          }
          __pyx_t_15 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_3, __pyx_v_freq) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_freq);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3985, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3985, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_14, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __PYX_ERR(0, 3985, __pyx_L41_error)
        }

        /* "pandas/_libs/tslibs/offsets.pyx":3984
 *                 else:
 *                     delta = delta + offset
 *         except (ValueError, TypeError) as err:             # <<<<<<<<<<<<<<
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(freq)) from err
 *     else:
 */
        /*finally:*/ {
          __pyx_L41_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_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
            if ((PY_MAJOR_VERSION < 3) || 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;
            {
              __Pyx_DECREF(__pyx_v_err);
              __pyx_v_err = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __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_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;
      __pyx_L8_except_error:;

      /* "pandas/_libs/tslibs/offsets.pyx":3948
 *         stride_sign = None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             split = opattern.split(freq)
 *             if split[-1] != "" and not split[-1].isspace():
 */
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L11_try_end:;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":3944
 *         return delta_to_tick(freq)
 * 
 *     elif isinstance(freq, str):             # <<<<<<<<<<<<<<
 *         delta = None
 *         stride_sign = None
 */
    goto __pyx_L5;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3987
 *             raise ValueError(INVALID_FREQ_ERR_MSG.format(freq)) from err
 *     else:
 *         delta = None             # <<<<<<<<<<<<<<
 * 
 *     if delta is None:
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_delta = Py_None;
  }
  __pyx_L5:;

  /* "pandas/_libs/tslibs/offsets.pyx":3989
 *         delta = None
 * 
 *     if delta is None:             # <<<<<<<<<<<<<<
 *         raise ValueError(INVALID_FREQ_ERR_MSG.format(freq))
 * 
 */
  __pyx_t_1 = (__pyx_v_delta == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pandas/_libs/tslibs/offsets.pyx":3990
 * 
 *     if delta is None:
 *         raise ValueError(INVALID_FREQ_ERR_MSG.format(freq))             # <<<<<<<<<<<<<<
 * 
 *     return delta
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_INVALID_FREQ_ERR_MSG); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_v_freq) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_freq);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 3990, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":3989
 *         delta = None
 * 
 *     if delta is None:             # <<<<<<<<<<<<<<
 *         raise ValueError(INVALID_FREQ_ERR_MSG.format(freq))
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":3992
 *         raise ValueError(INVALID_FREQ_ERR_MSG.format(freq))
 * 
 *     return delta             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_delta);
  __pyx_r = __pyx_v_delta;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3889
 * 
 * 
 * cpdef to_offset(freq):             # <<<<<<<<<<<<<<
 *     """
 *     Return DateOffset object from string or datetime.timedelta object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.to_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_stride_sign);
  __Pyx_XDECREF(__pyx_v_split);
  __Pyx_XDECREF(__pyx_v_tups);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_sep);
  __Pyx_XDECREF(__pyx_v_stride);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XDECREF(__pyx_v_off);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11to_offset(PyObject *__pyx_self, PyObject *__pyx_v_freq); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10to_offset[] = "\n    Return DateOffset object from string or datetime.timedelta object.\n\n    Parameters\n    ----------\n    freq : str, datetime.timedelta, BaseOffset or None\n\n    Returns\n    -------\n    DateOffset or None\n\n    Raises\n    ------\n    ValueError\n        If freq is an invalid frequency\n\n    See Also\n    --------\n    BaseOffset : Standard kind of date increment used for a date range.\n\n    Examples\n    --------\n    >>> to_offset(\"5min\")\n    <5 * Minutes>\n\n    >>> to_offset(\"1D1H\")\n    <25 * Hours>\n\n    >>> to_offset(\"2W\")\n    <2 * Weeks: weekday=6>\n\n    >>> to_offset(\"2B\")\n    <2 * BusinessDays>\n\n    >>> to_offset(pd.Timedelta(days=1))\n    <Day>\n\n    >>> to_offset(Hour())\n    <Hour>\n    ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11to_offset(PyObject *__pyx_self, PyObject *__pyx_v_freq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_offset (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_10to_offset(__pyx_self, ((PyObject *)__pyx_v_freq));

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_10to_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_freq) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_offset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_7offsets_to_offset(__pyx_v_freq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.to_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":3998
 * # RelativeDelta Arithmetic
 * 
 * cdef datetime _shift_day(datetime other, int days):             # <<<<<<<<<<<<<<
 *     """
 *     Increment the datetime `other` by the given number of days, retaining
 */

static PyDateTime_DateTime *__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_day(PyDateTime_DateTime *__pyx_v_other, int __pyx_v_days) {
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_naive = NULL;
  PyObject *__pyx_v_shifted = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_shift_day", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":4014
 *     shifted: datetime or Timestamp
 *     """
 *     if other.tzinfo is None:             # <<<<<<<<<<<<<<
 *         return other + timedelta(days=days)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":4015
 *     """
 *     if other.tzinfo is None:
 *         return other + timedelta(days=days)             # <<<<<<<<<<<<<<
 * 
 *     tz = other.tzinfo
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_days); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_days, __pyx_t_4) < 0) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_other), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 4015, __pyx_L1_error)
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":4014
 *     shifted: datetime or Timestamp
 *     """
 *     if other.tzinfo is None:             # <<<<<<<<<<<<<<
 *         return other + timedelta(days=days)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4017
 *         return other + timedelta(days=days)
 * 
 *     tz = other.tzinfo             # <<<<<<<<<<<<<<
 *     naive = other.replace(tzinfo=None)
 *     shifted = naive + timedelta(days=days)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4018
 * 
 *     tz = other.tzinfo
 *     naive = other.replace(tzinfo=None)             # <<<<<<<<<<<<<<
 *     shifted = naive + timedelta(days=days)
 *     return localize_pydatetime(shifted, tz)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tzinfo, Py_None) < 0) __PYX_ERR(0, 4018, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_naive = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4019
 *     tz = other.tzinfo
 *     naive = other.replace(tzinfo=None)
 *     shifted = naive + timedelta(days=days)             # <<<<<<<<<<<<<<
 *     return localize_pydatetime(shifted, tz)
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_days); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_days, __pyx_t_4) < 0) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_v_naive, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_shifted = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4020
 *     naive = other.replace(tzinfo=None)
 *     shifted = naive + timedelta(days=days)
 *     return localize_pydatetime(shifted, tz)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_shifted) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_shifted, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 4020, __pyx_L1_error)
  if (!(likely(((__pyx_v_tz) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_tz, __pyx_ptype_7cpython_8datetime_tzinfo))))) __PYX_ERR(0, 4020, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime(((PyDateTime_DateTime *)__pyx_v_shifted), ((PyDateTime_TZInfo *)__pyx_v_tz), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":3998
 * # RelativeDelta Arithmetic
 * 
 * cdef datetime _shift_day(datetime other, int days):             # <<<<<<<<<<<<<<
 *     """
 *     Increment the datetime `other` by the given number of days, retaining
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._shift_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_naive);
  __Pyx_XDECREF(__pyx_v_shifted);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4023
 * 
 * 
 * cdef inline int year_add_months(npy_datetimestruct dts, int months) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     New year number after shifting npy_datetimestruct number of months.
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets_year_add_months(npy_datetimestruct __pyx_v_dts, int __pyx_v_months) {
  int __pyx_r;

  /* "pandas/_libs/tslibs/offsets.pyx":4027
 *     New year number after shifting npy_datetimestruct number of months.
 *     """
 *     return dts.year + (dts.month + months - 1) // 12             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (__pyx_v_dts.year + __Pyx_div_long(((__pyx_v_dts.month + __pyx_v_months) - 1), 12));
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4023
 * 
 * 
 * cdef inline int year_add_months(npy_datetimestruct dts, int months) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     New year number after shifting npy_datetimestruct number of months.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4030
 * 
 * 
 * cdef inline int month_add_months(npy_datetimestruct dts, int months) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     New month number after shifting npy_datetimestruct
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets_month_add_months(npy_datetimestruct __pyx_v_dts, int __pyx_v_months) {
  int __pyx_v_new_month;
  int __pyx_r;
  int __pyx_t_1;

  /* "pandas/_libs/tslibs/offsets.pyx":4036
 *     """
 *     cdef:
 *         int new_month = (dts.month + months) % 12             # <<<<<<<<<<<<<<
 *     return 12 if new_month == 0 else new_month
 * 
 */
  __pyx_v_new_month = __Pyx_mod_long((__pyx_v_dts.month + __pyx_v_months), 12);

  /* "pandas/_libs/tslibs/offsets.pyx":4037
 *     cdef:
 *         int new_month = (dts.month + months) % 12
 *     return 12 if new_month == 0 else new_month             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (((__pyx_v_new_month == 0) != 0)) {
    __pyx_t_1 = 12;
  } else {
    __pyx_t_1 = __pyx_v_new_month;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4030
 * 
 * 
 * cdef inline int month_add_months(npy_datetimestruct dts, int months) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     New month number after shifting npy_datetimestruct
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4042
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cdef ndarray shift_quarters(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,
 *     int quarters,
 */

static PyArrayObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets_shift_quarters(PyArrayObject *__pyx_v_dtindex, int __pyx_v_quarters, int __pyx_v_q1start_month, PyObject *__pyx_v_day_opt, struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets_shift_quarters *__pyx_optional_args) {
  int __pyx_v_modby = ((int)3);
  NPY_DATETIMEUNIT __pyx_v_reso = __pyx_k__64;
  Py_ssize_t __pyx_v_count;
  PyArrayObject *__pyx_v_out = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_int64_t __pyx_v_res_val;
  int __pyx_v_months_since;
  int __pyx_v_n;
  npy_datetimestruct __pyx_v_dts;
  PyArrayMultiIterObject *__pyx_v_mi = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  __pyx_t_5numpy_int32_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("shift_quarters", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_modby = __pyx_optional_args->modby;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reso = __pyx_optional_args->reso;
      }
    }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4067
 *     out : ndarray[int64_t]
 *     """
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:             # <<<<<<<<<<<<<<
 *         raise ValueError("day must be None, 'start', 'end', "
 *                          "'business_start', or 'business_end'")
 */
  __Pyx_INCREF(__pyx_v_day_opt);
  __pyx_t_1 = __pyx_v_day_opt;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_start, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_end, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_business_start, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_business_end, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pandas/_libs/tslibs/offsets.pyx":4068
 *     """
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:
 *         raise ValueError("day must be None, 'start', 'end', "             # <<<<<<<<<<<<<<
 *                          "'business_start', or 'business_end'")
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4068, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":4067
 *     out : ndarray[int64_t]
 *     """
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:             # <<<<<<<<<<<<<<
 *         raise ValueError("day must be None, 'start', 'end', "
 *                          "'business_start', or 'business_end'")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4072
 * 
 *     cdef:
 *         Py_ssize_t count = dtindex.size             # <<<<<<<<<<<<<<
 *         ndarray out = cnp.PyArray_EMPTY(dtindex.ndim, dtindex.shape, cnp.NPY_INT64, 0)
 *         Py_ssize_t i
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dtindex), __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_count = __pyx_t_6;

  /* "pandas/_libs/tslibs/offsets.pyx":4073
 *     cdef:
 *         Py_ssize_t count = dtindex.size
 *         ndarray out = cnp.PyArray_EMPTY(dtindex.ndim, dtindex.shape, cnp.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         int64_t val, res_val
 */
  __pyx_t_5 = PyArray_EMPTY(__pyx_v_dtindex->nd, __pyx_v_dtindex->dimensions, NPY_INT64, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4073, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4078
 *         int months_since, n
 *         npy_datetimestruct dts
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_5 = __pyx_f_5numpy_PyArray_MultiIterNew2(((PyObject *)__pyx_v_out), ((PyObject *)__pyx_v_dtindex)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_broadcast))))) __PYX_ERR(0, 4078, __pyx_L1_error)
  __pyx_v_mi = ((PyArrayMultiIterObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4080
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             # Analogous to: val = dtindex[i]
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pandas/_libs/tslibs/offsets.pyx":4081
 * 
 *     with nogil:
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             # Analogous to: val = dtindex[i]
 *             val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 */
        __pyx_t_6 = __pyx_v_count;
        __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;

          /* "pandas/_libs/tslibs/offsets.pyx":4083
 *         for i in range(count):
 *             # Analogous to: val = dtindex[i]
 *             val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]             # <<<<<<<<<<<<<<
 * 
 *             if val == NPY_NAT:
 */
          __pyx_v_val = (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 1))[0]);

          /* "pandas/_libs/tslibs/offsets.pyx":4085
 *             val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *             if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 res_val = NPY_NAT
 *             else:
 */
          __pyx_t_3 = ((__pyx_v_val == __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT) != 0);
          if (__pyx_t_3) {

            /* "pandas/_libs/tslibs/offsets.pyx":4086
 * 
 *             if val == NPY_NAT:
 *                 res_val = NPY_NAT             # <<<<<<<<<<<<<<
 *             else:
 *                 pandas_datetime_to_datetimestruct(val, reso, &dts)
 */
            __pyx_v_res_val = __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT;

            /* "pandas/_libs/tslibs/offsets.pyx":4085
 *             val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *             if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 res_val = NPY_NAT
 *             else:
 */
            goto __pyx_L13;
          }

          /* "pandas/_libs/tslibs/offsets.pyx":4088
 *                 res_val = NPY_NAT
 *             else:
 *                 pandas_datetime_to_datetimestruct(val, reso, &dts)             # <<<<<<<<<<<<<<
 *                 n = quarters
 * 
 */
          /*else*/ {
            pandas_datetime_to_datetimestruct(__pyx_v_val, __pyx_v_reso, (&__pyx_v_dts));

            /* "pandas/_libs/tslibs/offsets.pyx":4089
 *             else:
 *                 pandas_datetime_to_datetimestruct(val, reso, &dts)
 *                 n = quarters             # <<<<<<<<<<<<<<
 * 
 *                 months_since = (dts.month - q1start_month) % modby
 */
            __pyx_v_n = __pyx_v_quarters;

            /* "pandas/_libs/tslibs/offsets.pyx":4091
 *                 n = quarters
 * 
 *                 months_since = (dts.month - q1start_month) % modby             # <<<<<<<<<<<<<<
 *                 n = _roll_qtrday(&dts, n, months_since, day_opt)
 * 
 */
            __pyx_t_9 = (__pyx_v_dts.month - __pyx_v_q1start_month);
            if (unlikely(__pyx_v_modby == 0)) {
              #ifdef WITH_THREAD
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              #endif
              PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              __PYX_ERR(0, 4091, __pyx_L9_error)
            }
            __pyx_v_months_since = __Pyx_mod___pyx_t_5numpy_int32_t(__pyx_t_9, __pyx_v_modby);

            /* "pandas/_libs/tslibs/offsets.pyx":4092
 * 
 *                 months_since = (dts.month - q1start_month) % modby
 *                 n = _roll_qtrday(&dts, n, months_since, day_opt)             # <<<<<<<<<<<<<<
 * 
 *                 dts.year = year_add_months(dts, modby * n - months_since)
 */
            __pyx_t_10 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__roll_qtrday((&__pyx_v_dts), __pyx_v_n, __pyx_v_months_since, __pyx_v_day_opt); if (unlikely(__pyx_t_10 == ((int)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4092, __pyx_L9_error)
            __pyx_v_n = __pyx_t_10;

            /* "pandas/_libs/tslibs/offsets.pyx":4094
 *                 n = _roll_qtrday(&dts, n, months_since, day_opt)
 * 
 *                 dts.year = year_add_months(dts, modby * n - months_since)             # <<<<<<<<<<<<<<
 *                 dts.month = month_add_months(dts, modby * n - months_since)
 *                 dts.day = get_day_of_month(&dts, day_opt)
 */
            __pyx_v_dts.year = __pyx_f_6pandas_5_libs_6tslibs_7offsets_year_add_months(__pyx_v_dts, ((__pyx_v_modby * __pyx_v_n) - __pyx_v_months_since));

            /* "pandas/_libs/tslibs/offsets.pyx":4095
 * 
 *                 dts.year = year_add_months(dts, modby * n - months_since)
 *                 dts.month = month_add_months(dts, modby * n - months_since)             # <<<<<<<<<<<<<<
 *                 dts.day = get_day_of_month(&dts, day_opt)
 * 
 */
            __pyx_v_dts.month = __pyx_f_6pandas_5_libs_6tslibs_7offsets_month_add_months(__pyx_v_dts, ((__pyx_v_modby * __pyx_v_n) - __pyx_v_months_since));

            /* "pandas/_libs/tslibs/offsets.pyx":4096
 *                 dts.year = year_add_months(dts, modby * n - months_since)
 *                 dts.month = month_add_months(dts, modby * n - months_since)
 *                 dts.day = get_day_of_month(&dts, day_opt)             # <<<<<<<<<<<<<<
 * 
 *                 res_val = npy_datetimestruct_to_datetime(reso, &dts)
 */
            __pyx_v_dts.day = __pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month((&__pyx_v_dts), __pyx_v_day_opt);

            /* "pandas/_libs/tslibs/offsets.pyx":4098
 *                 dts.day = get_day_of_month(&dts, day_opt)
 * 
 *                 res_val = npy_datetimestruct_to_datetime(reso, &dts)             # <<<<<<<<<<<<<<
 * 
 *             # Analogous to: out[i] = res_val
 */
            __pyx_v_res_val = npy_datetimestruct_to_datetime(__pyx_v_reso, (&__pyx_v_dts));
          }
          __pyx_L13:;

          /* "pandas/_libs/tslibs/offsets.pyx":4101
 * 
 *             # Analogous to: out[i] = res_val
 *             (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val             # <<<<<<<<<<<<<<
 * 
 *             cnp.PyArray_MultiIter_NEXT(mi)
 */
          (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 0))[0]) = __pyx_v_res_val;

          /* "pandas/_libs/tslibs/offsets.pyx":4103
 *             (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val
 * 
 *             cnp.PyArray_MultiIter_NEXT(mi)             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
          PyArray_MultiIter_NEXT(__pyx_v_mi);
        }
      }

      /* "pandas/_libs/tslibs/offsets.pyx":4080
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             # Analogous to: val = dtindex[i]
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L10;
        }
        __pyx_L9_error: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L1_error;
        }
        __pyx_L10:;
      }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4105
 *             cnp.PyArray_MultiIter_NEXT(mi)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4042
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cdef ndarray shift_quarters(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,
 *     int quarters,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.shift_quarters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_mi);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4110
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def shift_months(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,  # int64_t, arbitrary ndim
 *     int months,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13shift_months(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12shift_months[] = "\n    Given an int64-based datetime index, shift all elements\n    specified number of months using DateOffset semantics\n\n    day_opt: {None, 'start', 'end', 'business_start', 'business_end'}\n       * None: day of month\n       * 'start' 1st day of month\n       * 'end' last day of month\n    ";
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_13shift_months = {"shift_months", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13shift_months, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12shift_months};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13shift_months(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_dtindex = 0;
  int __pyx_v_months;
  PyObject *__pyx_v_day_opt = 0;
  NPY_DATETIMEUNIT __pyx_v_reso;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shift_months (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dtindex,&__pyx_n_s_months,&__pyx_n_s_day_opt_2,&__pyx_n_s_reso,0};
    PyObject* values[4] = {0,0,0,0};

    /* "pandas/_libs/tslibs/offsets.pyx":4113
 *     ndarray dtindex,  # int64_t, arbitrary ndim
 *     int months,
 *     str day_opt=None,             # <<<<<<<<<<<<<<
 *     NPY_DATETIMEUNIT reso=NPY_DATETIMEUNIT.NPY_FR_ns,
 * ):
 */
    values[2] = ((PyObject*)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtindex)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_months)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("shift_months", 0, 2, 4, 1); __PYX_ERR(0, 4110, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_day_opt_2);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reso);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shift_months") < 0)) __PYX_ERR(0, 4110, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dtindex = ((PyArrayObject *)values[0]);
    __pyx_v_months = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_months == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4112, __pyx_L3_error)
    __pyx_v_day_opt = ((PyObject*)values[2]);
    if (values[3]) {
      __pyx_v_reso = ((NPY_DATETIMEUNIT)__Pyx_PyInt_As_NPY_DATETIMEUNIT(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4114, __pyx_L3_error)
    } else {
      __pyx_v_reso = __pyx_k__66;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("shift_months", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4110, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.shift_months", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) __PYX_ERR(0, 4111, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_day_opt), (&PyUnicode_Type), 1, "day_opt", 1))) __PYX_ERR(0, 4113, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_12shift_months(__pyx_self, __pyx_v_dtindex, __pyx_v_months, __pyx_v_day_opt, __pyx_v_reso);

  /* "pandas/_libs/tslibs/offsets.pyx":4110
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def shift_months(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,  # int64_t, arbitrary ndim
 *     int months,
 */

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_12shift_months(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, int __pyx_v_months, PyObject *__pyx_v_day_opt, NPY_DATETIMEUNIT __pyx_v_reso) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  npy_datetimestruct __pyx_v_dts;
  int __pyx_v_count;
  PyArrayObject *__pyx_v_out = 0;
  int __pyx_v_months_to_roll;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_int64_t __pyx_v_res_val;
  PyArrayMultiIterObject *__pyx_v_mi = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  __pyx_t_5numpy_int32_t __pyx_t_9;
  __pyx_t_5numpy_int32_t __pyx_t_10;
  __pyx_t_5numpy_int32_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("shift_months", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":4128
 *         Py_ssize_t i
 *         npy_datetimestruct dts
 *         int count = dtindex.size             # <<<<<<<<<<<<<<
 *         ndarray out = cnp.PyArray_EMPTY(dtindex.ndim, dtindex.shape, cnp.NPY_INT64, 0)
 *         int months_to_roll
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dtindex), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_count = __pyx_t_2;

  /* "pandas/_libs/tslibs/offsets.pyx":4129
 *         npy_datetimestruct dts
 *         int count = dtindex.size
 *         ndarray out = cnp.PyArray_EMPTY(dtindex.ndim, dtindex.shape, cnp.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         int months_to_roll
 *         int64_t val, res_val
 */
  __pyx_t_1 = PyArray_EMPTY(__pyx_v_dtindex->nd, __pyx_v_dtindex->dimensions, NPY_INT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4129, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4133
 *         int64_t val, res_val
 * 
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)             # <<<<<<<<<<<<<<
 * 
 *     if day_opt not in [None, "start", "end", "business_start", "business_end"]:
 */
  __pyx_t_1 = __pyx_f_5numpy_PyArray_MultiIterNew2(((PyObject *)__pyx_v_out), ((PyObject *)__pyx_v_dtindex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_broadcast))))) __PYX_ERR(0, 4133, __pyx_L1_error)
  __pyx_v_mi = ((PyArrayMultiIterObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4135
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)
 * 
 *     if day_opt not in [None, "start", "end", "business_start", "business_end"]:             # <<<<<<<<<<<<<<
 *         raise ValueError("day must be None, 'start', 'end', "
 *                          "'business_start', or 'business_end'")
 */
  __Pyx_INCREF(__pyx_v_day_opt);
  __pyx_t_3 = __pyx_v_day_opt;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, Py_None, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_start, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_end, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_business_start, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_business_end, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (unlikely(__pyx_t_5)) {

    /* "pandas/_libs/tslibs/offsets.pyx":4136
 * 
 *     if day_opt not in [None, "start", "end", "business_start", "business_end"]:
 *         raise ValueError("day must be None, 'start', 'end', "             # <<<<<<<<<<<<<<
 *                          "'business_start', or 'business_end'")
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 4136, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":4135
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)
 * 
 *     if day_opt not in [None, "start", "end", "business_start", "business_end"]:             # <<<<<<<<<<<<<<
 *         raise ValueError("day must be None, 'start', 'end', "
 *                          "'business_start', or 'business_end'")
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4139
 *                          "'business_start', or 'business_end'")
 * 
 *     if day_opt is None:             # <<<<<<<<<<<<<<
 *         # TODO: can we combine this with the non-None case?
 *         with nogil:
 */
  __pyx_t_5 = (__pyx_v_day_opt == ((PyObject*)Py_None));
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":4141
 *     if day_opt is None:
 *         # TODO: can we combine this with the non-None case?
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "pandas/_libs/tslibs/offsets.pyx":4142
 *         # TODO: can we combine this with the non-None case?
 *         with nogil:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 */
          __pyx_t_2 = __pyx_v_count;
          __pyx_t_7 = __pyx_t_2;
          for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
            __pyx_v_i = __pyx_t_8;

            /* "pandas/_libs/tslibs/offsets.pyx":4144
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]             # <<<<<<<<<<<<<<
 * 
 *                 if val == NPY_NAT:
 */
            __pyx_v_val = (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 1))[0]);

            /* "pandas/_libs/tslibs/offsets.pyx":4146
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 *                 else:
 */
            __pyx_t_4 = ((__pyx_v_val == __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT) != 0);
            if (__pyx_t_4) {

              /* "pandas/_libs/tslibs/offsets.pyx":4147
 * 
 *                 if val == NPY_NAT:
 *                     res_val = NPY_NAT             # <<<<<<<<<<<<<<
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 */
              __pyx_v_res_val = __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT;

              /* "pandas/_libs/tslibs/offsets.pyx":4146
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 *                 else:
 */
              goto __pyx_L15;
            }

            /* "pandas/_libs/tslibs/offsets.pyx":4149
 *                     res_val = NPY_NAT
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)             # <<<<<<<<<<<<<<
 *                     dts.year = year_add_months(dts, months)
 *                     dts.month = month_add_months(dts, months)
 */
            /*else*/ {
              pandas_datetime_to_datetimestruct(__pyx_v_val, __pyx_v_reso, (&__pyx_v_dts));

              /* "pandas/_libs/tslibs/offsets.pyx":4150
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 *                     dts.year = year_add_months(dts, months)             # <<<<<<<<<<<<<<
 *                     dts.month = month_add_months(dts, months)
 * 
 */
              __pyx_v_dts.year = __pyx_f_6pandas_5_libs_6tslibs_7offsets_year_add_months(__pyx_v_dts, __pyx_v_months);

              /* "pandas/_libs/tslibs/offsets.pyx":4151
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 *                     dts.year = year_add_months(dts, months)
 *                     dts.month = month_add_months(dts, months)             # <<<<<<<<<<<<<<
 * 
 *                     dts.day = min(dts.day, get_days_in_month(dts.year, dts.month))
 */
              __pyx_v_dts.month = __pyx_f_6pandas_5_libs_6tslibs_7offsets_month_add_months(__pyx_v_dts, __pyx_v_months);

              /* "pandas/_libs/tslibs/offsets.pyx":4153
 *                     dts.month = month_add_months(dts, months)
 * 
 *                     dts.day = min(dts.day, get_days_in_month(dts.year, dts.month))             # <<<<<<<<<<<<<<
 *                     res_val = npy_datetimestruct_to_datetime(reso, &dts)
 * 
 */
              __pyx_t_9 = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_dts.year, __pyx_v_dts.month, 0);
              __pyx_t_10 = __pyx_v_dts.day;
              if (((__pyx_t_9 < __pyx_t_10) != 0)) {
                __pyx_t_11 = __pyx_t_9;
              } else {
                __pyx_t_11 = __pyx_t_10;
              }
              __pyx_v_dts.day = __pyx_t_11;

              /* "pandas/_libs/tslibs/offsets.pyx":4154
 * 
 *                     dts.day = min(dts.day, get_days_in_month(dts.year, dts.month))
 *                     res_val = npy_datetimestruct_to_datetime(reso, &dts)             # <<<<<<<<<<<<<<
 * 
 *                 # Analogous to: out[i] = res_val
 */
              __pyx_v_res_val = npy_datetimestruct_to_datetime(__pyx_v_reso, (&__pyx_v_dts));
            }
            __pyx_L15:;

            /* "pandas/_libs/tslibs/offsets.pyx":4157
 * 
 *                 # Analogous to: out[i] = res_val
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val             # <<<<<<<<<<<<<<
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 */
            (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 0))[0]) = __pyx_v_res_val;

            /* "pandas/_libs/tslibs/offsets.pyx":4159
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
            PyArray_MultiIter_NEXT(__pyx_v_mi);
          }
        }

        /* "pandas/_libs/tslibs/offsets.pyx":4141
 *     if day_opt is None:
 *         # TODO: can we combine this with the non-None case?
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 # Analogous to: val = i8other[i]
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L12;
          }
          __pyx_L12:;
        }
    }

    /* "pandas/_libs/tslibs/offsets.pyx":4139
 *                          "'business_start', or 'business_end'")
 * 
 *     if day_opt is None:             # <<<<<<<<<<<<<<
 *         # TODO: can we combine this with the non-None case?
 *         with nogil:
 */
    goto __pyx_L9;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4162
 * 
 *     else:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 * 
 */
  /*else*/ {
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "pandas/_libs/tslibs/offsets.pyx":4163
 *     else:
 *         with nogil:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 * 
 *                 # Analogous to: val = i8other[i]
 */
          __pyx_t_2 = __pyx_v_count;
          __pyx_t_7 = __pyx_t_2;
          for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
            __pyx_v_i = __pyx_t_8;

            /* "pandas/_libs/tslibs/offsets.pyx":4166
 * 
 *                 # Analogous to: val = i8other[i]
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]             # <<<<<<<<<<<<<<
 * 
 *                 if val == NPY_NAT:
 */
            __pyx_v_val = (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 1))[0]);

            /* "pandas/_libs/tslibs/offsets.pyx":4168
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 *                 else:
 */
            __pyx_t_4 = ((__pyx_v_val == __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT) != 0);
            if (__pyx_t_4) {

              /* "pandas/_libs/tslibs/offsets.pyx":4169
 * 
 *                 if val == NPY_NAT:
 *                     res_val = NPY_NAT             # <<<<<<<<<<<<<<
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 */
              __pyx_v_res_val = __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT;

              /* "pandas/_libs/tslibs/offsets.pyx":4168
 *                 val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *                 if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     res_val = NPY_NAT
 *                 else:
 */
              goto __pyx_L21;
            }

            /* "pandas/_libs/tslibs/offsets.pyx":4171
 *                     res_val = NPY_NAT
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)             # <<<<<<<<<<<<<<
 *                     months_to_roll = months
 * 
 */
            /*else*/ {
              pandas_datetime_to_datetimestruct(__pyx_v_val, __pyx_v_reso, (&__pyx_v_dts));

              /* "pandas/_libs/tslibs/offsets.pyx":4172
 *                 else:
 *                     pandas_datetime_to_datetimestruct(val, reso, &dts)
 *                     months_to_roll = months             # <<<<<<<<<<<<<<
 * 
 *                     months_to_roll = _roll_qtrday(&dts, months_to_roll, 0, day_opt)
 */
              __pyx_v_months_to_roll = __pyx_v_months;

              /* "pandas/_libs/tslibs/offsets.pyx":4174
 *                     months_to_roll = months
 * 
 *                     months_to_roll = _roll_qtrday(&dts, months_to_roll, 0, day_opt)             # <<<<<<<<<<<<<<
 * 
 *                     dts.year = year_add_months(dts, months_to_roll)
 */
              __pyx_t_12 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__roll_qtrday((&__pyx_v_dts), __pyx_v_months_to_roll, 0, __pyx_v_day_opt); if (unlikely(__pyx_t_12 == ((int)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4174, __pyx_L17_error)
              __pyx_v_months_to_roll = __pyx_t_12;

              /* "pandas/_libs/tslibs/offsets.pyx":4176
 *                     months_to_roll = _roll_qtrday(&dts, months_to_roll, 0, day_opt)
 * 
 *                     dts.year = year_add_months(dts, months_to_roll)             # <<<<<<<<<<<<<<
 *                     dts.month = month_add_months(dts, months_to_roll)
 *                     dts.day = get_day_of_month(&dts, day_opt)
 */
              __pyx_v_dts.year = __pyx_f_6pandas_5_libs_6tslibs_7offsets_year_add_months(__pyx_v_dts, __pyx_v_months_to_roll);

              /* "pandas/_libs/tslibs/offsets.pyx":4177
 * 
 *                     dts.year = year_add_months(dts, months_to_roll)
 *                     dts.month = month_add_months(dts, months_to_roll)             # <<<<<<<<<<<<<<
 *                     dts.day = get_day_of_month(&dts, day_opt)
 * 
 */
              __pyx_v_dts.month = __pyx_f_6pandas_5_libs_6tslibs_7offsets_month_add_months(__pyx_v_dts, __pyx_v_months_to_roll);

              /* "pandas/_libs/tslibs/offsets.pyx":4178
 *                     dts.year = year_add_months(dts, months_to_roll)
 *                     dts.month = month_add_months(dts, months_to_roll)
 *                     dts.day = get_day_of_month(&dts, day_opt)             # <<<<<<<<<<<<<<
 * 
 *                     res_val = npy_datetimestruct_to_datetime(reso, &dts)
 */
              __pyx_v_dts.day = __pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month((&__pyx_v_dts), __pyx_v_day_opt);

              /* "pandas/_libs/tslibs/offsets.pyx":4180
 *                     dts.day = get_day_of_month(&dts, day_opt)
 * 
 *                     res_val = npy_datetimestruct_to_datetime(reso, &dts)             # <<<<<<<<<<<<<<
 * 
 *                 # Analogous to: out[i] = res_val
 */
              __pyx_v_res_val = npy_datetimestruct_to_datetime(__pyx_v_reso, (&__pyx_v_dts));
            }
            __pyx_L21:;

            /* "pandas/_libs/tslibs/offsets.pyx":4183
 * 
 *                 # Analogous to: out[i] = res_val
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val             # <<<<<<<<<<<<<<
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 */
            (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 0))[0]) = __pyx_v_res_val;

            /* "pandas/_libs/tslibs/offsets.pyx":4185
 *                 (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val
 * 
 *                 cnp.PyArray_MultiIter_NEXT(mi)             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
            PyArray_MultiIter_NEXT(__pyx_v_mi);
          }
        }

        /* "pandas/_libs/tslibs/offsets.pyx":4162
 * 
 *     else:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L18;
          }
          __pyx_L17_error: {
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L1_error;
          }
          __pyx_L18:;
        }
    }
  }
  __pyx_L9:;

  /* "pandas/_libs/tslibs/offsets.pyx":4187
 *                 cnp.PyArray_MultiIter_NEXT(mi)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4110
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def shift_months(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,  # int64_t, arbitrary ndim
 *     int months,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.shift_months", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_mi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4192
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cdef ndarray _shift_bdays(             # <<<<<<<<<<<<<<
 *     ndarray i8other,
 *     int periods,
 */

static PyArrayObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets__shift_bdays(PyArrayObject *__pyx_v_i8other, int __pyx_v_periods, struct __pyx_opt_args_6pandas_5_libs_6tslibs_7offsets__shift_bdays *__pyx_optional_args) {
  NPY_DATETIMEUNIT __pyx_v_reso = __pyx_k__67;
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_int64_t __pyx_v_res_val;
  int __pyx_v_wday;
  int __pyx_v_nadj;
  int __pyx_v_days;
  npy_datetimestruct __pyx_v_dts;
  __pyx_t_5numpy_int64_t __pyx_v_DAY_PERIODS;
  PyArrayMultiIterObject *__pyx_v_mi = 0;
  PyObject *__pyx_v_weeks = NULL;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  __pyx_t_5numpy_int64_t __pyx_t_3;
  struct __pyx_opt_args_6pandas_5_libs_6tslibs_6dtypes_periods_per_day __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_shift_bdays", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_reso = __pyx_optional_args->reso;
    }
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4211
 *     """
 *     cdef:
 *         Py_ssize_t i, n = i8other.size             # <<<<<<<<<<<<<<
 *         ndarray result = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)
 *         int64_t val, res_val
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_i8other), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/_libs/tslibs/offsets.pyx":4212
 *     cdef:
 *         Py_ssize_t i, n = i8other.size
 *         ndarray result = cnp.PyArray_EMPTY(i8other.ndim, i8other.shape, cnp.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         int64_t val, res_val
 *         int wday, nadj, days
 */
  __pyx_t_1 = PyArray_EMPTY(__pyx_v_i8other->nd, __pyx_v_i8other->dimensions, NPY_INT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4212, __pyx_L1_error)
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4216
 *         int wday, nadj, days
 *         npy_datetimestruct dts
 *         int64_t DAY_PERIODS = periods_per_day(reso)             # <<<<<<<<<<<<<<
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(result, i8other)
 * 
 */
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.reso = __pyx_v_reso;
  __pyx_t_3 = __pyx_f_6pandas_5_libs_6tslibs_6dtypes_periods_per_day(0, &__pyx_t_4); if (unlikely(__pyx_t_3 == ((__pyx_t_5numpy_int64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4216, __pyx_L1_error)
  __pyx_v_DAY_PERIODS = __pyx_t_3;

  /* "pandas/_libs/tslibs/offsets.pyx":4217
 *         npy_datetimestruct dts
 *         int64_t DAY_PERIODS = periods_per_day(reso)
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(result, i8other)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = __pyx_f_5numpy_PyArray_MultiIterNew2(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_v_i8other)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_broadcast))))) __PYX_ERR(0, 4217, __pyx_L1_error)
  __pyx_v_mi = ((PyArrayMultiIterObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4219
 *         cnp.broadcast mi = cnp.PyArray_MultiIterNew2(result, i8other)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         # Analogous to: val = i8other[i]
 *         val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 */
  __pyx_t_2 = __pyx_v_n;
  __pyx_t_5 = __pyx_t_2;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/_libs/tslibs/offsets.pyx":4221
 *     for i in range(n):
 *         # Analogous to: val = i8other[i]
 *         val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]             # <<<<<<<<<<<<<<
 * 
 *         if val == NPY_NAT:
 */
    __pyx_v_val = (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 1))[0]);

    /* "pandas/_libs/tslibs/offsets.pyx":4223
 *         val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *         if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *             res_val = NPY_NAT
 *         else:
 */
    __pyx_t_7 = ((__pyx_v_val == __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT) != 0);
    if (__pyx_t_7) {

      /* "pandas/_libs/tslibs/offsets.pyx":4224
 * 
 *         if val == NPY_NAT:
 *             res_val = NPY_NAT             # <<<<<<<<<<<<<<
 *         else:
 *             # The rest of this is effectively a copy of BusinessDay.apply
 */
      __pyx_v_res_val = __pyx_v_6pandas_5_libs_6tslibs_7nattype_NPY_NAT;

      /* "pandas/_libs/tslibs/offsets.pyx":4223
 *         val = (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 1))[0]
 * 
 *         if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *             res_val = NPY_NAT
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":4227
 *         else:
 *             # The rest of this is effectively a copy of BusinessDay.apply
 *             nadj = periods             # <<<<<<<<<<<<<<
 *             weeks = nadj // 5
 *             pandas_datetime_to_datetimestruct(val, reso, &dts)
 */
    /*else*/ {
      __pyx_v_nadj = __pyx_v_periods;

      /* "pandas/_libs/tslibs/offsets.pyx":4228
 *             # The rest of this is effectively a copy of BusinessDay.apply
 *             nadj = periods
 *             weeks = nadj // 5             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(val, reso, &dts)
 *             wday = dayofweek(dts.year, dts.month, dts.day)
 */
      __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_v_nadj, 5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_weeks, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":4229
 *             nadj = periods
 *             weeks = nadj // 5
 *             pandas_datetime_to_datetimestruct(val, reso, &dts)             # <<<<<<<<<<<<<<
 *             wday = dayofweek(dts.year, dts.month, dts.day)
 * 
 */
      pandas_datetime_to_datetimestruct(__pyx_v_val, __pyx_v_reso, (&__pyx_v_dts));

      /* "pandas/_libs/tslibs/offsets.pyx":4230
 *             weeks = nadj // 5
 *             pandas_datetime_to_datetimestruct(val, reso, &dts)
 *             wday = dayofweek(dts.year, dts.month, dts.day)             # <<<<<<<<<<<<<<
 * 
 *             if nadj <= 0 and wday > 4:
 */
      __pyx_v_wday = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_dayofweek(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day);

      /* "pandas/_libs/tslibs/offsets.pyx":4232
 *             wday = dayofweek(dts.year, dts.month, dts.day)
 * 
 *             if nadj <= 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 nadj += 1
 */
      __pyx_t_8 = ((__pyx_v_nadj <= 0) != 0);
      if (__pyx_t_8) {
      } else {
        __pyx_t_7 = __pyx_t_8;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_8 = ((__pyx_v_wday > 4) != 0);
      __pyx_t_7 = __pyx_t_8;
      __pyx_L7_bool_binop_done:;
      if (__pyx_t_7) {

        /* "pandas/_libs/tslibs/offsets.pyx":4234
 *             if nadj <= 0 and wday > 4:
 *                 # roll forward
 *                 nadj += 1             # <<<<<<<<<<<<<<
 * 
 *             nadj -= 5 * weeks
 */
        __pyx_v_nadj = (__pyx_v_nadj + 1);

        /* "pandas/_libs/tslibs/offsets.pyx":4232
 *             wday = dayofweek(dts.year, dts.month, dts.day)
 * 
 *             if nadj <= 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 nadj += 1
 */
      }

      /* "pandas/_libs/tslibs/offsets.pyx":4236
 *                 nadj += 1
 * 
 *             nadj -= 5 * weeks             # <<<<<<<<<<<<<<
 * 
 *             # nadj is always >= 0 at this point
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nadj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyNumber_Multiply(__pyx_int_5, __pyx_v_weeks); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_10); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4236, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_v_nadj = __pyx_t_11;

      /* "pandas/_libs/tslibs/offsets.pyx":4239
 * 
 *             # nadj is always >= 0 at this point
 *             if nadj == 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll back
 *                 days = 4 - wday
 */
      __pyx_t_8 = ((__pyx_v_nadj == 0) != 0);
      if (__pyx_t_8) {
      } else {
        __pyx_t_7 = __pyx_t_8;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_8 = ((__pyx_v_wday > 4) != 0);
      __pyx_t_7 = __pyx_t_8;
      __pyx_L10_bool_binop_done:;
      if (__pyx_t_7) {

        /* "pandas/_libs/tslibs/offsets.pyx":4241
 *             if nadj == 0 and wday > 4:
 *                 # roll back
 *                 days = 4 - wday             # <<<<<<<<<<<<<<
 *             elif wday > 4:
 *                 # roll forward
 */
        __pyx_v_days = (4 - __pyx_v_wday);

        /* "pandas/_libs/tslibs/offsets.pyx":4239
 * 
 *             # nadj is always >= 0 at this point
 *             if nadj == 0 and wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll back
 *                 days = 4 - wday
 */
        goto __pyx_L9;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":4242
 *                 # roll back
 *                 days = 4 - wday
 *             elif wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 days = (7 - wday) + (nadj - 1)
 */
      __pyx_t_7 = ((__pyx_v_wday > 4) != 0);
      if (__pyx_t_7) {

        /* "pandas/_libs/tslibs/offsets.pyx":4244
 *             elif wday > 4:
 *                 # roll forward
 *                 days = (7 - wday) + (nadj - 1)             # <<<<<<<<<<<<<<
 *             elif wday + nadj <= 4:
 *                 # shift by n days without leaving the current week
 */
        __pyx_v_days = ((7 - __pyx_v_wday) + (__pyx_v_nadj - 1));

        /* "pandas/_libs/tslibs/offsets.pyx":4242
 *                 # roll back
 *                 days = 4 - wday
 *             elif wday > 4:             # <<<<<<<<<<<<<<
 *                 # roll forward
 *                 days = (7 - wday) + (nadj - 1)
 */
        goto __pyx_L9;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":4245
 *                 # roll forward
 *                 days = (7 - wday) + (nadj - 1)
 *             elif wday + nadj <= 4:             # <<<<<<<<<<<<<<
 *                 # shift by n days without leaving the current week
 *                 days = nadj
 */
      __pyx_t_7 = (((__pyx_v_wday + __pyx_v_nadj) <= 4) != 0);
      if (__pyx_t_7) {

        /* "pandas/_libs/tslibs/offsets.pyx":4247
 *             elif wday + nadj <= 4:
 *                 # shift by n days without leaving the current week
 *                 days = nadj             # <<<<<<<<<<<<<<
 *             else:
 *                 # shift by nadj days plus 2 to get past the weekend
 */
        __pyx_v_days = __pyx_v_nadj;

        /* "pandas/_libs/tslibs/offsets.pyx":4245
 *                 # roll forward
 *                 days = (7 - wday) + (nadj - 1)
 *             elif wday + nadj <= 4:             # <<<<<<<<<<<<<<
 *                 # shift by n days without leaving the current week
 *                 days = nadj
 */
        goto __pyx_L9;
      }

      /* "pandas/_libs/tslibs/offsets.pyx":4250
 *             else:
 *                 # shift by nadj days plus 2 to get past the weekend
 *                 days = nadj + 2             # <<<<<<<<<<<<<<
 * 
 *             res_val = val + (7 * weeks + days) * DAY_PERIODS
 */
      /*else*/ {
        __pyx_v_days = (__pyx_v_nadj + 2);
      }
      __pyx_L9:;

      /* "pandas/_libs/tslibs/offsets.pyx":4252
 *                 days = nadj + 2
 * 
 *             res_val = val + (7 * weeks + days) * DAY_PERIODS             # <<<<<<<<<<<<<<
 * 
 *         # Analogous to: out[i] = res_val
 */
      __pyx_t_10 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyNumber_Multiply(__pyx_int_7, __pyx_v_weeks); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_days); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = PyNumber_Add(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_DAY_PERIODS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyNumber_Multiply(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_3 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4252, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_res_val = __pyx_t_3;
    }
    __pyx_L5:;

    /* "pandas/_libs/tslibs/offsets.pyx":4255
 * 
 *         # Analogous to: out[i] = res_val
 *         (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val             # <<<<<<<<<<<<<<
 * 
 *         cnp.PyArray_MultiIter_NEXT(mi)
 */
    (((__pyx_t_5numpy_int64_t *)PyArray_MultiIter_DATA(__pyx_v_mi, 0))[0]) = __pyx_v_res_val;

    /* "pandas/_libs/tslibs/offsets.pyx":4257
 *         (<int64_t*>cnp.PyArray_MultiIter_DATA(mi, 0))[0] = res_val
 * 
 *         cnp.PyArray_MultiIter_NEXT(mi)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    PyArray_MultiIter_NEXT(__pyx_v_mi);
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4259
 *         cnp.PyArray_MultiIter_NEXT(mi)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4192
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cdef ndarray _shift_bdays(             # <<<<<<<<<<<<<<
 *     ndarray i8other,
 *     int periods,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets._shift_bdays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_mi);
  __Pyx_XDECREF(__pyx_v_weeks);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4262
 * 
 * 
 * def shift_month(stamp: datetime, months: int, day_opt: object = None) -> datetime:             # <<<<<<<<<<<<<<
 *     """
 *     Given a datetime (or Timestamp) `stamp`, an integer `months` and an
 */

/* Python wrapper */
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15shift_month(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_14shift_month[] = "\n    Given a datetime (or Timestamp) `stamp`, an integer `months` and an\n    option `day_opt`, return a new datetimelike that many months later,\n    with day determined by `day_opt` using relativedelta semantics.\n\n    Scalar analogue of shift_months.\n\n    Parameters\n    ----------\n    stamp : datetime or Timestamp\n    months : int\n    day_opt : None, 'start', 'end', 'business_start', 'business_end', or int\n        None: returned datetimelike has the same day as the input, or the\n              last day of the month if the new month is too short\n        'start': returned datetimelike has day=1\n        'end': returned datetimelike has day on the last day of the month\n        'business_start': returned datetimelike has day on the first\n            business day of the month\n        'business_end': returned datetimelike has day on the last\n            business day of the month\n        int: returned datetimelike has day equal to day_opt\n\n    Returns\n    -------\n    shifted : datetime or Timestamp (same as input `stamp`)\n    ";
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_15shift_month = {"shift_month", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15shift_month, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_14shift_month};
static PyDateTime_DateTime *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15shift_month(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyDateTime_DateTime *__pyx_v_stamp = 0;
  PyObject *__pyx_v_months = 0;
  PyObject *__pyx_v_day_opt = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyDateTime_DateTime *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shift_month (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stamp,&__pyx_n_s_months,&__pyx_n_s_day_opt_2,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stamp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_months)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("shift_month", 0, 2, 3, 1); __PYX_ERR(0, 4262, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_day_opt_2);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shift_month") < 0)) __PYX_ERR(0, 4262, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_stamp = ((PyDateTime_DateTime *)values[0]);
    __pyx_v_months = values[1];
    __pyx_v_day_opt = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("shift_month", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4262, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.shift_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamp), __pyx_ptype_7cpython_8datetime_datetime, 1, "stamp", 0))) __PYX_ERR(0, 4262, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_14shift_month(__pyx_self, __pyx_v_stamp, __pyx_v_months, __pyx_v_day_opt);

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

static PyDateTime_DateTime *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_14shift_month(CYTHON_UNUSED PyObject *__pyx_self, PyDateTime_DateTime *__pyx_v_stamp, PyObject *__pyx_v_months, PyObject *__pyx_v_day_opt) {
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  int __pyx_v_days_in_month;
  int __pyx_v_dy;
  PyDateTime_DateTime *__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_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("shift_month", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":4293
 *         int days_in_month, dy
 * 
 *     dy = (stamp.month + months) // 12             # <<<<<<<<<<<<<<
 *     month = (stamp.month + months) % 12
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_stamp), __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_months); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_2, __pyx_int_12, 12, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dy = __pyx_t_3;

  /* "pandas/_libs/tslibs/offsets.pyx":4294
 * 
 *     dy = (stamp.month + months) // 12
 *     month = (stamp.month + months) % 12             # <<<<<<<<<<<<<<
 * 
 *     if month == 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_stamp), __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_months); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_t_2, __pyx_int_12, 12, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_month = __pyx_t_3;

  /* "pandas/_libs/tslibs/offsets.pyx":4296
 *     month = (stamp.month + months) % 12
 * 
 *     if month == 0:             # <<<<<<<<<<<<<<
 *         month = 12
 *         dy -= 1
 */
  __pyx_t_4 = ((__pyx_v_month == 0) != 0);
  if (__pyx_t_4) {

    /* "pandas/_libs/tslibs/offsets.pyx":4297
 * 
 *     if month == 0:
 *         month = 12             # <<<<<<<<<<<<<<
 *         dy -= 1
 *     year = stamp.year + dy
 */
    __pyx_v_month = 12;

    /* "pandas/_libs/tslibs/offsets.pyx":4298
 *     if month == 0:
 *         month = 12
 *         dy -= 1             # <<<<<<<<<<<<<<
 *     year = stamp.year + dy
 * 
 */
    __pyx_v_dy = (__pyx_v_dy - 1);

    /* "pandas/_libs/tslibs/offsets.pyx":4296
 *     month = (stamp.month + months) % 12
 * 
 *     if month == 0:             # <<<<<<<<<<<<<<
 *         month = 12
 *         dy -= 1
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4299
 *         month = 12
 *         dy -= 1
 *     year = stamp.year + dy             # <<<<<<<<<<<<<<
 * 
 *     if day_opt is None:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_stamp), __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_dy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_year = __pyx_t_3;

  /* "pandas/_libs/tslibs/offsets.pyx":4301
 *     year = stamp.year + dy
 * 
 *     if day_opt is None:             # <<<<<<<<<<<<<<
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(stamp.day, days_in_month)
 */
  __pyx_t_4 = (__pyx_v_day_opt == Py_None);
  __pyx_t_6 = (__pyx_t_4 != 0);
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":4302
 * 
 *     if day_opt is None:
 *         days_in_month = get_days_in_month(year, month)             # <<<<<<<<<<<<<<
 *         day = min(stamp.day, days_in_month)
 *     elif day_opt == "start":
 */
    __pyx_v_days_in_month = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_year, __pyx_v_month, 0);

    /* "pandas/_libs/tslibs/offsets.pyx":4303
 *     if day_opt is None:
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(stamp.day, days_in_month)             # <<<<<<<<<<<<<<
 *     elif day_opt == "start":
 *         day = 1
 */
    __pyx_t_3 = __pyx_v_days_in_month;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_stamp), __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4303, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4303, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4303, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __pyx_t_7;
      __pyx_t_7 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_t_5;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4303, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_day = __pyx_t_3;

    /* "pandas/_libs/tslibs/offsets.pyx":4301
 *     year = stamp.year + dy
 * 
 *     if day_opt is None:             # <<<<<<<<<<<<<<
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(stamp.day, days_in_month)
 */
    goto __pyx_L4;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4304
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(stamp.day, days_in_month)
 *     elif day_opt == "start":             # <<<<<<<<<<<<<<
 *         day = 1
 *     elif day_opt == "end":
 */
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_start, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4304, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":4305
 *         day = min(stamp.day, days_in_month)
 *     elif day_opt == "start":
 *         day = 1             # <<<<<<<<<<<<<<
 *     elif day_opt == "end":
 *         day = get_days_in_month(year, month)
 */
    __pyx_v_day = 1;

    /* "pandas/_libs/tslibs/offsets.pyx":4304
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(stamp.day, days_in_month)
 *     elif day_opt == "start":             # <<<<<<<<<<<<<<
 *         day = 1
 *     elif day_opt == "end":
 */
    goto __pyx_L4;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4306
 *     elif day_opt == "start":
 *         day = 1
 *     elif day_opt == "end":             # <<<<<<<<<<<<<<
 *         day = get_days_in_month(year, month)
 *     elif day_opt == "business_start":
 */
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_end, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4306, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":4307
 *         day = 1
 *     elif day_opt == "end":
 *         day = get_days_in_month(year, month)             # <<<<<<<<<<<<<<
 *     elif day_opt == "business_start":
 *         # first business day of month
 */
    __pyx_v_day = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_year, __pyx_v_month, 0);

    /* "pandas/_libs/tslibs/offsets.pyx":4306
 *     elif day_opt == "start":
 *         day = 1
 *     elif day_opt == "end":             # <<<<<<<<<<<<<<
 *         day = get_days_in_month(year, month)
 *     elif day_opt == "business_start":
 */
    goto __pyx_L4;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4308
 *     elif day_opt == "end":
 *         day = get_days_in_month(year, month)
 *     elif day_opt == "business_start":             # <<<<<<<<<<<<<<
 *         # first business day of month
 *         day = get_firstbday(year, month)
 */
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_business_start, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4308, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":4310
 *     elif day_opt == "business_start":
 *         # first business day of month
 *         day = get_firstbday(year, month)             # <<<<<<<<<<<<<<
 *     elif day_opt == "business_end":
 *         # last business day of month
 */
    __pyx_v_day = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_firstbday(__pyx_v_year, __pyx_v_month, 0);

    /* "pandas/_libs/tslibs/offsets.pyx":4308
 *     elif day_opt == "end":
 *         day = get_days_in_month(year, month)
 *     elif day_opt == "business_start":             # <<<<<<<<<<<<<<
 *         # first business day of month
 *         day = get_firstbday(year, month)
 */
    goto __pyx_L4;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4311
 *         # first business day of month
 *         day = get_firstbday(year, month)
 *     elif day_opt == "business_end":             # <<<<<<<<<<<<<<
 *         # last business day of month
 *         day = get_lastbday(year, month)
 */
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_business_end, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4311, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pandas/_libs/tslibs/offsets.pyx":4313
 *     elif day_opt == "business_end":
 *         # last business day of month
 *         day = get_lastbday(year, month)             # <<<<<<<<<<<<<<
 *     elif is_integer_object(day_opt):
 *         days_in_month = get_days_in_month(year, month)
 */
    __pyx_v_day = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_lastbday(__pyx_v_year, __pyx_v_month, 0);

    /* "pandas/_libs/tslibs/offsets.pyx":4311
 *         # first business day of month
 *         day = get_firstbday(year, month)
 *     elif day_opt == "business_end":             # <<<<<<<<<<<<<<
 *         # last business day of month
 *         day = get_lastbday(year, month)
 */
    goto __pyx_L4;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4314
 *         # last business day of month
 *         day = get_lastbday(year, month)
 *     elif is_integer_object(day_opt):             # <<<<<<<<<<<<<<
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(day_opt, days_in_month)
 */
  __pyx_t_6 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_integer_object(__pyx_v_day_opt) != 0);
  if (likely(__pyx_t_6)) {

    /* "pandas/_libs/tslibs/offsets.pyx":4315
 *         day = get_lastbday(year, month)
 *     elif is_integer_object(day_opt):
 *         days_in_month = get_days_in_month(year, month)             # <<<<<<<<<<<<<<
 *         day = min(day_opt, days_in_month)
 *     else:
 */
    __pyx_v_days_in_month = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_year, __pyx_v_month, 0);

    /* "pandas/_libs/tslibs/offsets.pyx":4316
 *     elif is_integer_object(day_opt):
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(day_opt, days_in_month)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(day_opt)
 */
    __pyx_t_3 = __pyx_v_days_in_month;
    __Pyx_INCREF(__pyx_v_day_opt);
    __pyx_t_2 = __pyx_v_day_opt;
    __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4316, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 4316, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1;
      __pyx_t_1 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = __pyx_t_2;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4316, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_day = __pyx_t_3;

    /* "pandas/_libs/tslibs/offsets.pyx":4314
 *         # last business day of month
 *         day = get_lastbday(year, month)
 *     elif is_integer_object(day_opt):             # <<<<<<<<<<<<<<
 *         days_in_month = get_days_in_month(year, month)
 *         day = min(day_opt, days_in_month)
 */
    goto __pyx_L4;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4318
 *         day = min(day_opt, days_in_month)
 *     else:
 *         raise ValueError(day_opt)             # <<<<<<<<<<<<<<
 *     return stamp.replace(year=year, month=month, day=day)
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_day_opt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4318, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "pandas/_libs/tslibs/offsets.pyx":4319
 *     else:
 *         raise ValueError(day_opt)
 *     return stamp.replace(year=year, month=month, day=day)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_stamp), __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_year, __pyx_t_1) < 0) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_month, __pyx_t_1) < 0) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_day, __pyx_t_1) < 0) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 4319, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4262
 * 
 * 
 * def shift_month(stamp: datetime, months: int, day_opt: object = None) -> datetime:             # <<<<<<<<<<<<<<
 *     """
 *     Given a datetime (or Timestamp) `stamp`, an integer `months` and an
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.shift_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4322
 * 
 * 
 * cdef inline int get_day_of_month(npy_datetimestruct* dts, str day_opt) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Find the day in `other`'s month that satisfies a DateOffset's is_on_offset
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month(npy_datetimestruct *__pyx_v_dts, PyObject *__pyx_v_day_opt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4354
 *     """
 * 
 *     if day_opt == "start":             # <<<<<<<<<<<<<<
 *         return 1
 *     elif day_opt == "end":
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_start, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4354, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":4355
 * 
 *     if day_opt == "start":
 *         return 1             # <<<<<<<<<<<<<<
 *     elif day_opt == "end":
 *         return get_days_in_month(dts.year, dts.month)
 */
    __pyx_r = 1;
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":4354
 *     """
 * 
 *     if day_opt == "start":             # <<<<<<<<<<<<<<
 *         return 1
 *     elif day_opt == "end":
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4356
 *     if day_opt == "start":
 *         return 1
 *     elif day_opt == "end":             # <<<<<<<<<<<<<<
 *         return get_days_in_month(dts.year, dts.month)
 *     elif day_opt == "business_start":
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_end, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4356, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":4357
 *         return 1
 *     elif day_opt == "end":
 *         return get_days_in_month(dts.year, dts.month)             # <<<<<<<<<<<<<<
 *     elif day_opt == "business_start":
 *         # first business day of month
 */
    __pyx_r = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month(__pyx_v_dts->year, __pyx_v_dts->month, 0);
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":4356
 *     if day_opt == "start":
 *         return 1
 *     elif day_opt == "end":             # <<<<<<<<<<<<<<
 *         return get_days_in_month(dts.year, dts.month)
 *     elif day_opt == "business_start":
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4358
 *     elif day_opt == "end":
 *         return get_days_in_month(dts.year, dts.month)
 *     elif day_opt == "business_start":             # <<<<<<<<<<<<<<
 *         # first business day of month
 *         return get_firstbday(dts.year, dts.month)
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_day_opt, __pyx_n_u_business_start, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4358, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/_libs/tslibs/offsets.pyx":4360
 *     elif day_opt == "business_start":
 *         # first business day of month
 *         return get_firstbday(dts.year, dts.month)             # <<<<<<<<<<<<<<
 *     else:
 *         # i.e. day_opt == "business_end":
 */
    __pyx_r = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_firstbday(__pyx_v_dts->year, __pyx_v_dts->month, 0);
    goto __pyx_L0;

    /* "pandas/_libs/tslibs/offsets.pyx":4358
 *     elif day_opt == "end":
 *         return get_days_in_month(dts.year, dts.month)
 *     elif day_opt == "business_start":             # <<<<<<<<<<<<<<
 *         # first business day of month
 *         return get_firstbday(dts.year, dts.month)
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4364
 *         # i.e. day_opt == "business_end":
 *         # last business day of month
 *         return get_lastbday(dts.year, dts.month)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_r = __pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_lastbday(__pyx_v_dts->year, __pyx_v_dts->month, 0);
    goto __pyx_L0;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4322
 * 
 * 
 * cdef inline int get_day_of_month(npy_datetimestruct* dts, str day_opt) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Find the day in `other`'s month that satisfies a DateOffset's is_on_offset
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pandas._libs.tslibs.offsets.get_day_of_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4367
 * 
 * 
 * cpdef int roll_convention(int other, int n, int compare) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Possibly increment or decrement the number of periods to shift
 */

static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17roll_convention(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(int __pyx_v_other, int __pyx_v_n, int __pyx_v_compare, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "pandas/_libs/tslibs/offsets.pyx":4383
 *     n : int number of periods to increment
 *     """
 *     if n > 0 and other < compare:             # <<<<<<<<<<<<<<
 *         n -= 1
 *     elif n <= 0 and other > compare:
 */
  __pyx_t_2 = ((__pyx_v_n > 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_other < __pyx_v_compare) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":4384
 *     """
 *     if n > 0 and other < compare:
 *         n -= 1             # <<<<<<<<<<<<<<
 *     elif n <= 0 and other > compare:
 *         # as if rolled forward already
 */
    __pyx_v_n = (__pyx_v_n - 1);

    /* "pandas/_libs/tslibs/offsets.pyx":4383
 *     n : int number of periods to increment
 *     """
 *     if n > 0 and other < compare:             # <<<<<<<<<<<<<<
 *         n -= 1
 *     elif n <= 0 and other > compare:
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4385
 *     if n > 0 and other < compare:
 *         n -= 1
 *     elif n <= 0 and other > compare:             # <<<<<<<<<<<<<<
 *         # as if rolled forward already
 *         n += 1
 */
  __pyx_t_2 = ((__pyx_v_n <= 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_other > __pyx_v_compare) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":4387
 *     elif n <= 0 and other > compare:
 *         # as if rolled forward already
 *         n += 1             # <<<<<<<<<<<<<<
 *     return n
 * 
 */
    __pyx_v_n = (__pyx_v_n + 1);

    /* "pandas/_libs/tslibs/offsets.pyx":4385
 *     if n > 0 and other < compare:
 *         n -= 1
 *     elif n <= 0 and other > compare:             # <<<<<<<<<<<<<<
 *         # as if rolled forward already
 *         n += 1
 */
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":4388
 *         # as if rolled forward already
 *         n += 1
 *     return n             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_n;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4367
 * 
 * 
 * cpdef int roll_convention(int other, int n, int compare) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Possibly increment or decrement the number of periods to shift
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17roll_convention(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_16roll_convention[] = "\n    Possibly increment or decrement the number of periods to shift\n    based on rollforward/rollbackward conventions.\n\n    Parameters\n    ----------\n    other : int, generally the day component of a datetime\n    n : number of periods to increment, before adjusting for rolling\n    compare : int, generally the day component of a datetime, in the same\n              month as the datetime form which `other` was taken.\n\n    Returns\n    -------\n    n : int number of periods to increment\n    ";
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17roll_convention(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_other;
  int __pyx_v_n;
  int __pyx_v_compare;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_convention (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_n,&__pyx_n_s_compare,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_convention", 1, 3, 3, 1); __PYX_ERR(0, 4367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compare)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_convention", 1, 3, 3, 2); __PYX_ERR(0, 4367, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_convention") < 0)) __PYX_ERR(0, 4367, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_other = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_other == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4367, __pyx_L3_error)
    __pyx_v_n = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4367, __pyx_L3_error)
    __pyx_v_compare = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_compare == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4367, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_convention", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4367, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.roll_convention", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_16roll_convention(__pyx_self, __pyx_v_other, __pyx_v_n, __pyx_v_compare);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_16roll_convention(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_other, int __pyx_v_n, int __pyx_v_compare) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_convention", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_6pandas_5_libs_6tslibs_7offsets_roll_convention(__pyx_v_other, __pyx_v_n, __pyx_v_compare, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.roll_convention", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4391
 * 
 * 
 * def roll_qtrday(other: datetime, n: int, month: int,             # <<<<<<<<<<<<<<
 *                 day_opt: str, modby: int) -> int:
 *     """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19roll_qtrday(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5_libs_6tslibs_7offsets_18roll_qtrday[] = "\n    Possibly increment or decrement the number of periods to shift\n    based on rollforward/rollbackward conventions.\n\n    Parameters\n    ----------\n    other : datetime or Timestamp\n    n : number of periods to increment, before adjusting for rolling\n    month : int reference month giving the first month of the year\n    day_opt : {'start', 'end', 'business_start', 'business_end'}\n        The convention to use in finding the day in a given month against\n        which to compare for rollforward/rollbackward decisions.\n    modby : int 3 for quarters, 12 for years\n\n    Returns\n    -------\n    n : int number of periods to increment\n\n    See Also\n    --------\n    get_day_of_month : Find the day in a month provided an offset.\n    ";
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_19roll_qtrday = {"roll_qtrday", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19roll_qtrday, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_18roll_qtrday};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19roll_qtrday(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyDateTime_DateTime *__pyx_v_other = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_month = 0;
  PyObject *__pyx_v_day_opt = 0;
  PyObject *__pyx_v_modby = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_qtrday (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_n,&__pyx_n_s_month,&__pyx_n_s_day_opt_2,&__pyx_n_s_modby,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_qtrday", 1, 5, 5, 1); __PYX_ERR(0, 4391, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_month)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_qtrday", 1, 5, 5, 2); __PYX_ERR(0, 4391, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_day_opt_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_qtrday", 1, 5, 5, 3); __PYX_ERR(0, 4391, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modby)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_qtrday", 1, 5, 5, 4); __PYX_ERR(0, 4391, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_qtrday") < 0)) __PYX_ERR(0, 4391, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_other = ((PyDateTime_DateTime *)values[0]);
    __pyx_v_n = values[1];
    __pyx_v_month = values[2];
    __pyx_v_day_opt = ((PyObject*)values[3]);
    __pyx_v_modby = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_qtrday", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4391, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.roll_qtrday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_datetime, 1, "other", 0))) __PYX_ERR(0, 4391, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_day_opt), (&PyUnicode_Type), 1, "day_opt", 1))) __PYX_ERR(0, 4392, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_18roll_qtrday(__pyx_self, __pyx_v_other, __pyx_v_n, __pyx_v_month, __pyx_v_day_opt, __pyx_v_modby);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_18roll_qtrday(CYTHON_UNUSED PyObject *__pyx_self, PyDateTime_DateTime *__pyx_v_other, PyObject *__pyx_v_n, PyObject *__pyx_v_month, PyObject *__pyx_v_day_opt, PyObject *__pyx_v_modby) {
  int __pyx_v_months_since;
  npy_datetimestruct __pyx_v_dts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_qtrday", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":4419
 *         npy_datetimestruct dts
 * 
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:             # <<<<<<<<<<<<<<
 *         raise ValueError(day_opt)
 * 
 */
  __Pyx_INCREF(__pyx_v_day_opt);
  __pyx_t_1 = __pyx_v_day_opt;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_start, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4419, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_end, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4419, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_business_start, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4419, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_business_end, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4419, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pandas/_libs/tslibs/offsets.pyx":4420
 * 
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:
 *         raise ValueError(day_opt)             # <<<<<<<<<<<<<<
 * 
 *     pydate_to_dtstruct(other, &dts)
 */
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_day_opt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4420, __pyx_L1_error)

    /* "pandas/_libs/tslibs/offsets.pyx":4419
 *         npy_datetimestruct dts
 * 
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:             # <<<<<<<<<<<<<<
 *         raise ValueError(day_opt)
 * 
 */
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4422
 *         raise ValueError(day_opt)
 * 
 *     pydate_to_dtstruct(other, &dts)             # <<<<<<<<<<<<<<
 * 
 *     if modby == 12:
 */
  if (!(likely(((((PyObject *)__pyx_v_other)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 4422, __pyx_L1_error)
  __pyx_f_6pandas_5_libs_6tslibs_11np_datetime_pydate_to_dtstruct(((PyDateTime_Date *)__pyx_v_other), (&__pyx_v_dts));

  /* "pandas/_libs/tslibs/offsets.pyx":4424
 *     pydate_to_dtstruct(other, &dts)
 * 
 *     if modby == 12:             # <<<<<<<<<<<<<<
 *         # We care about the month-of-year, not month-of-quarter, so skip mod
 *         months_since = other.month - month
 */
  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_modby, __pyx_int_12, 12, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "pandas/_libs/tslibs/offsets.pyx":4426
 *     if modby == 12:
 *         # We care about the month-of-year, not month-of-quarter, so skip mod
 *         months_since = other.month - month             # <<<<<<<<<<<<<<
 *     else:
 *         months_since = other.month % modby - month % modby
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_months_since = __pyx_t_7;

    /* "pandas/_libs/tslibs/offsets.pyx":4424
 *     pydate_to_dtstruct(other, &dts)
 * 
 *     if modby == 12:             # <<<<<<<<<<<<<<
 *         # We care about the month-of-year, not month-of-quarter, so skip mod
 *         months_since = other.month - month
 */
    goto __pyx_L8;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4428
 *         months_since = other.month - month
 *     else:
 *         months_since = other.month % modby - month % modby             # <<<<<<<<<<<<<<
 * 
 *     return _roll_qtrday(&dts, n, months_since, day_opt)
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PyNumber_Remainder(__pyx_t_6, __pyx_v_modby); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Remainder(__pyx_v_month, __pyx_v_modby); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyNumber_Subtract(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4428, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_months_since = __pyx_t_7;
  }
  __pyx_L8:;

  /* "pandas/_libs/tslibs/offsets.pyx":4430
 *         months_since = other.month % modby - month % modby
 * 
 *     return _roll_qtrday(&dts, n, months_since, day_opt)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4430, __pyx_L1_error)
  __pyx_t_9 = __pyx_f_6pandas_5_libs_6tslibs_7offsets__roll_qtrday((&__pyx_v_dts), __pyx_t_7, __pyx_v_months_since, __pyx_v_day_opt); if (unlikely(__pyx_t_9 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4430, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4391
 * 
 * 
 * def roll_qtrday(other: datetime, n: int, month: int,             # <<<<<<<<<<<<<<
 *                 day_opt: str, modby: int) -> int:
 *     """
 */

  /* 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_8);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.roll_qtrday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/_libs/tslibs/offsets.pyx":4433
 * 
 * 
 * cdef inline int _roll_qtrday(npy_datetimestruct* dts,             # <<<<<<<<<<<<<<
 *                              int n,
 *                              int months_since,
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_7offsets__roll_qtrday(npy_datetimestruct *__pyx_v_dts, int __pyx_v_n, int __pyx_v_months_since, PyObject *__pyx_v_day_opt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "pandas/_libs/tslibs/offsets.pyx":4441
 *     """
 * 
 *     if n > 0:             # <<<<<<<<<<<<<<
 *         if months_since < 0 or (months_since == 0 and
 *                                 dts.day < get_day_of_month(dts, day_opt)):
 */
  __pyx_t_1 = ((__pyx_v_n > 0) != 0);
  if (__pyx_t_1) {

    /* "pandas/_libs/tslibs/offsets.pyx":4442
 * 
 *     if n > 0:
 *         if months_since < 0 or (months_since == 0 and             # <<<<<<<<<<<<<<
 *                                 dts.day < get_day_of_month(dts, day_opt)):
 *             # pretend to roll back if on same month but
 */
    __pyx_t_2 = ((__pyx_v_months_since < 0) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_months_since == 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":4443
 *     if n > 0:
 *         if months_since < 0 or (months_since == 0 and
 *                                 dts.day < get_day_of_month(dts, day_opt)):             # <<<<<<<<<<<<<<
 *             # pretend to roll back if on same month but
 *             # before compare_day
 */
    __pyx_t_2 = ((__pyx_v_dts->day < __pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month(__pyx_v_dts, __pyx_v_day_opt)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;

    /* "pandas/_libs/tslibs/offsets.pyx":4442
 * 
 *     if n > 0:
 *         if months_since < 0 or (months_since == 0 and             # <<<<<<<<<<<<<<
 *                                 dts.day < get_day_of_month(dts, day_opt)):
 *             # pretend to roll back if on same month but
 */
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":4446
 *             # pretend to roll back if on same month but
 *             # before compare_day
 *             n -= 1             # <<<<<<<<<<<<<<
 *     else:
 *         if months_since > 0 or (months_since == 0 and
 */
      __pyx_v_n = (__pyx_v_n - 1);

      /* "pandas/_libs/tslibs/offsets.pyx":4442
 * 
 *     if n > 0:
 *         if months_since < 0 or (months_since == 0 and             # <<<<<<<<<<<<<<
 *                                 dts.day < get_day_of_month(dts, day_opt)):
 *             # pretend to roll back if on same month but
 */
    }

    /* "pandas/_libs/tslibs/offsets.pyx":4441
 *     """
 * 
 *     if n > 0:             # <<<<<<<<<<<<<<
 *         if months_since < 0 or (months_since == 0 and
 *                                 dts.day < get_day_of_month(dts, day_opt)):
 */
    goto __pyx_L3;
  }

  /* "pandas/_libs/tslibs/offsets.pyx":4448
 *             n -= 1
 *     else:
 *         if months_since > 0 or (months_since == 0 and             # <<<<<<<<<<<<<<
 *                                 dts.day > get_day_of_month(dts, day_opt)):
 *             # make sure to roll forward, so negate
 */
  /*else*/ {
    __pyx_t_2 = ((__pyx_v_months_since > 0) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_months_since == 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L9_bool_binop_done;
    }

    /* "pandas/_libs/tslibs/offsets.pyx":4449
 *     else:
 *         if months_since > 0 or (months_since == 0 and
 *                                 dts.day > get_day_of_month(dts, day_opt)):             # <<<<<<<<<<<<<<
 *             # make sure to roll forward, so negate
 *             n += 1
 */
    __pyx_t_2 = ((__pyx_v_dts->day > __pyx_f_6pandas_5_libs_6tslibs_7offsets_get_day_of_month(__pyx_v_dts, __pyx_v_day_opt)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L9_bool_binop_done:;

    /* "pandas/_libs/tslibs/offsets.pyx":4448
 *             n -= 1
 *     else:
 *         if months_since > 0 or (months_since == 0 and             # <<<<<<<<<<<<<<
 *                                 dts.day > get_day_of_month(dts, day_opt)):
 *             # make sure to roll forward, so negate
 */
    if (__pyx_t_1) {

      /* "pandas/_libs/tslibs/offsets.pyx":4451
 *                                 dts.day > get_day_of_month(dts, day_opt)):
 *             # make sure to roll forward, so negate
 *             n += 1             # <<<<<<<<<<<<<<
 *     return n
 */
      __pyx_v_n = (__pyx_v_n + 1);

      /* "pandas/_libs/tslibs/offsets.pyx":4448
 *             n -= 1
 *     else:
 *         if months_since > 0 or (months_since == 0 and             # <<<<<<<<<<<<<<
 *                                 dts.day > get_day_of_month(dts, day_opt)):
 *             # make sure to roll forward, so negate
 */
    }
  }
  __pyx_L3:;

  /* "pandas/_libs/tslibs/offsets.pyx":4452
 *             # make sure to roll forward, so negate
 *             n += 1
 *     return n             # <<<<<<<<<<<<<<
 */
  __pyx_r = __pyx_v_n;
  goto __pyx_L0;

  /* "pandas/_libs/tslibs/offsets.pyx":4433
 * 
 * 
 * cdef inline int _roll_qtrday(npy_datetimestruct* dts,             # <<<<<<<<<<<<<<
 *                              int n,
 *                              int months_since,
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BaseOffset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_21__pyx_unpickle_BaseOffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_21__pyx_unpickle_BaseOffset = {"__pyx_unpickle_BaseOffset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_21__pyx_unpickle_BaseOffset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_21__pyx_unpickle_BaseOffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseOffset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseOffset", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseOffset", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BaseOffset") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseOffset", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.__pyx_unpickle_BaseOffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_20__pyx_unpickle_BaseOffset(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_20__pyx_unpickle_BaseOffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseOffset", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__68, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = BaseOffset.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BaseOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = BaseOffset.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = BaseOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = BaseOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_BaseOffset__set_state(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = BaseOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseOffset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.__pyx_unpickle_BaseOffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_BaseOffset__set_state(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseOffset__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_cache);
  __Pyx_DECREF(__pyx_v___pyx_result->_cache);
  __pyx_v___pyx_result->_cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->n = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->normalize = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.__pyx_unpickle_BaseOffset__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_RelativeDeltaOffset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23__pyx_unpickle_RelativeDeltaOffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5_libs_6tslibs_7offsets_23__pyx_unpickle_RelativeDeltaOffset = {"__pyx_unpickle_RelativeDeltaOffset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23__pyx_unpickle_RelativeDeltaOffset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23__pyx_unpickle_RelativeDeltaOffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_RelativeDeltaOffset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RelativeDeltaOffset", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RelativeDeltaOffset", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RelativeDeltaOffset") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RelativeDeltaOffset", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.__pyx_unpickle_RelativeDeltaOffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5_libs_6tslibs_7offsets_22__pyx_unpickle_RelativeDeltaOffset(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_6pandas_5_libs_6tslibs_7offsets_22__pyx_unpickle_RelativeDeltaOffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RelativeDeltaOffset", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__68, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = RelativeDeltaOffset.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = RelativeDeltaOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = RelativeDeltaOffset.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = RelativeDeltaOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = RelativeDeltaOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_RelativeDeltaOffset__set_state(((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 *     __pyx_result = RelativeDeltaOffset.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RelativeDeltaOffset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.__pyx_unpickle_RelativeDeltaOffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pandas_5_libs_6tslibs_7offsets___pyx_unpickle_RelativeDeltaOffset__set_state(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RelativeDeltaOffset__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._cache);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._cache);
  __pyx_v___pyx_result->__pyx_base._cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.n = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.normalize = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_RelativeDeltaOffset__set_state(<RelativeDeltaOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RelativeDeltaOffset__set_state(RelativeDeltaOffset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._libs.tslibs.offsets.__pyx_unpickle_RelativeDeltaOffset__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":734
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":735
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":734
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":737
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":738
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":737
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":740
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":741
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":740
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":743
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":744
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":743
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":746
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":747
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":746
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":749
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":750
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
  if (__pyx_t_1) {

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":751
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":750
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":753
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":749
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

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

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":928
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":929
 * 
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
 */
  Py_INCREF(__pyx_v_base);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":930
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":928
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

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

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":932
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":933
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
 */
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":934
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":935
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":934
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":936
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":932
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

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

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":940
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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_RefNannySetupContext("import_array", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":941
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":942
 * cdef inline int import_array() except -1:
 *     try:
 *         __pyx_import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 942, __pyx_L3_error)

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":941
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":943
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 943, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":944
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 944, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(3, 944, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":941
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":940
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":946
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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_RefNannySetupContext("import_umath", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":947
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":948
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 948, __pyx_L3_error)

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":947
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":949
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 949, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":950
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 950, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(3, 950, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":947
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":946
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":952
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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_RefNannySetupContext("import_ufunc", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":953
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":954
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 954, __pyx_L3_error)

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":953
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":955
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 955, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":956
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef extern from *:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 956, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(3, 956, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":953
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":952
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":966
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":978
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":966
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

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

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":981
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime64_object", 0);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":993
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":981
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

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

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":996
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
  npy_datetime __pyx_r;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1003
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":996
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1006
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
  npy_timedelta __pyx_r;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1010
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1006
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1013
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
  NPY_DATETIMEUNIT __pyx_r;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1017
 *     returns the unit part of the dtype for a numpy datetime64 object.
 *     """
 *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
  goto __pyx_L0;

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":1013
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":104
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
 */

static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("import_datetime", 0);

  /* "cpython/datetime.pxd":105
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():
 *     PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DateTime CAPI factory function.
 */
  (void)(PyDateTime_IMPORT);

  /* "cpython/datetime.pxd":104
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
 */

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

/* "cpython/datetime.pxd":109
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_new", 0);

  /* "cpython/datetime.pxd":110
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object date_new(int year, int month, int day):
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)             # <<<<<<<<<<<<<<
 * 
 * # Create time object using DateTime CAPI factory function
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":109
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":114
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI.TimeType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_new", 0);

  /* "cpython/datetime.pxd":115
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz):
 *     return PyDateTimeAPI.Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI.TimeType)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->Time_FromTime(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, PyDateTimeAPI->TimeType); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":114
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI.TimeType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":119
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromDateAndTime(year, month, day, hour, minute, second, microsecond, tz, PyDateTimeAPI.DateTimeType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_new", 0);

  /* "cpython/datetime.pxd":120
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz):
 *     return PyDateTimeAPI.DateTime_FromDateAndTime(year, month, day, hour, minute, second, microsecond, tz, PyDateTimeAPI.DateTimeType)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->DateTime_FromDateAndTime(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, PyDateTimeAPI->DateTimeType); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":119
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromDateAndTime(year, month, day, hour, minute, second, microsecond, tz, PyDateTimeAPI.DateTimeType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":124
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedelta_new", 0);

  /* "cpython/datetime.pxd":125
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object timedelta_new(int days, int seconds, int useconds):
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)             # <<<<<<<<<<<<<<
 * 
 * # More recognizable getters for date/time/datetime/timedelta.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":124
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":133
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_Time*>o).hastzinfo:
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("time_tzinfo", 0);

  /* "cpython/datetime.pxd":134
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     if (<PyDateTime_Time*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 *     else:
 */
  __pyx_t_1 = (((PyDateTime_Time *)__pyx_v_o)->hastzinfo != 0);
  if (__pyx_t_1) {

    /* "cpython/datetime.pxd":135
 * cdef inline object time_tzinfo(object o):
 *     if (<PyDateTime_Time*>o).hastzinfo:
 *         return <object>(<PyDateTime_Time*>o).tzinfo             # <<<<<<<<<<<<<<
 *     else:
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo));
    __pyx_r = ((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo);
    goto __pyx_L0;

    /* "cpython/datetime.pxd":134
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     if (<PyDateTime_Time*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 *     else:
 */
  }

  /* "cpython/datetime.pxd":137
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of datetime
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "cpython/datetime.pxd":133
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_Time*>o).hastzinfo:
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 */

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

/* "cpython/datetime.pxd":140
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_DateTime*>o).hastzinfo:
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("datetime_tzinfo", 0);

  /* "cpython/datetime.pxd":141
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     if (<PyDateTime_DateTime*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 *     else:
 */
  __pyx_t_1 = (((PyDateTime_DateTime *)__pyx_v_o)->hastzinfo != 0);
  if (__pyx_t_1) {

    /* "cpython/datetime.pxd":142
 * cdef inline object datetime_tzinfo(object o):
 *     if (<PyDateTime_DateTime*>o).hastzinfo:
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo             # <<<<<<<<<<<<<<
 *     else:
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo));
    __pyx_r = ((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo);
    goto __pyx_L0;

    /* "cpython/datetime.pxd":141
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     if (<PyDateTime_DateTime*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 *     else:
 */
  }

  /* "cpython/datetime.pxd":144
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * # Get year of date
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "cpython/datetime.pxd":140
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_DateTime*>o).hastzinfo:
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 */

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

/* "cpython/datetime.pxd":147
 * 
 * # Get year of date
 * cdef inline int date_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_year", 0);

  /* "cpython/datetime.pxd":148
 * # Get year of date
 * cdef inline int date_year(object o):
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of date
 */
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":147
 * 
 * # Get year of date
 * cdef inline int date_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

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

/* "cpython/datetime.pxd":151
 * 
 * # Get month of date
 * cdef inline int date_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_month", 0);

  /* "cpython/datetime.pxd":152
 * # Get month of date
 * cdef inline int date_month(object o):
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of date
 */
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":151
 * 
 * # Get month of date
 * cdef inline int date_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

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

/* "cpython/datetime.pxd":155
 * 
 * # Get day of date
 * cdef inline int date_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_day", 0);

  /* "cpython/datetime.pxd":156
 * # Get day of date
 * cdef inline int date_day(object o):
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of datetime
 */
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":155
 * 
 * # Get day of date
 * cdef inline int date_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

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

/* "cpython/datetime.pxd":159
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_year", 0);

  /* "cpython/datetime.pxd":160
 * # Get year of datetime
 * cdef inline int datetime_year(object o):
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of datetime
 */
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":159
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

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

/* "cpython/datetime.pxd":163
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_month", 0);

  /* "cpython/datetime.pxd":164
 * # Get month of datetime
 * cdef inline int datetime_month(object o):
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of datetime
 */
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":163
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

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

/* "cpython/datetime.pxd":167
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_day", 0);

  /* "cpython/datetime.pxd":168
 * # Get day of datetime
 * cdef inline int datetime_day(object o):
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of time
 */
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":167
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

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

/* "cpython/datetime.pxd":171
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_hour", 0);

  /* "cpython/datetime.pxd":172
 * # Get hour of time
 * cdef inline int time_hour(object o):
 *     return PyDateTime_TIME_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of time
 */
  __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":171
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
 */

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

/* "cpython/datetime.pxd":175
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_minute", 0);

  /* "cpython/datetime.pxd":176
 * # Get minute of time
 * cdef inline int time_minute(object o):
 *     return PyDateTime_TIME_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of time
 */
  __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":175
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
 */

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

/* "cpython/datetime.pxd":179
 * 
 * # Get second of time
 * cdef inline int time_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_second", 0);

  /* "cpython/datetime.pxd":180
 * # Get second of time
 * cdef inline int time_second(object o):
 *     return PyDateTime_TIME_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of time
 */
  __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":179
 * 
 * # Get second of time
 * cdef inline int time_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
 */

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

/* "cpython/datetime.pxd":183
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_microsecond", 0);

  /* "cpython/datetime.pxd":184
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):
 *     return PyDateTime_TIME_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of datetime
 */
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":183
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
 */

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

/* "cpython/datetime.pxd":187
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_hour", 0);

  /* "cpython/datetime.pxd":188
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):
 *     return PyDateTime_DATE_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":187
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
 */

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

/* "cpython/datetime.pxd":191
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_minute", 0);

  /* "cpython/datetime.pxd":192
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):
 *     return PyDateTime_DATE_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":191
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
 */

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

/* "cpython/datetime.pxd":195
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_second", 0);

  /* "cpython/datetime.pxd":196
 * # Get second of datetime
 * cdef inline int datetime_second(object o):
 *     return PyDateTime_DATE_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":195
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
 */

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

/* "cpython/datetime.pxd":199
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_microsecond", 0);

  /* "cpython/datetime.pxd":200
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):
 *     return PyDateTime_DATE_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get days of timedelta
 */
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":199
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
 */

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

/* "cpython/datetime.pxd":203
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).days
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedelta_days", 0);

  /* "cpython/datetime.pxd":204
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):
 *     return (<PyDateTime_Delta*>o).days             # <<<<<<<<<<<<<<
 * 
 * # Get seconds of timedelta
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->days;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":203
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).days
 * 
 */

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

/* "cpython/datetime.pxd":207
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).seconds
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedelta_seconds", 0);

  /* "cpython/datetime.pxd":208
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):
 *     return (<PyDateTime_Delta*>o).seconds             # <<<<<<<<<<<<<<
 * 
 * # Get microseconds of timedelta
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->seconds;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":207
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).seconds
 * 
 */

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

/* "cpython/datetime.pxd":211
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedelta_microseconds", 0);

  /* "cpython/datetime.pxd":212
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):
 *     return (<PyDateTime_Delta*>o).microseconds             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->microseconds;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":211
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 */

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

/* "util.pxd":51
 * 
 * 
 * cdef inline int64_t get_nat():             # <<<<<<<<<<<<<<
 *     return NPY_MIN_INT64
 * 
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5_libs_6tslibs_4util_get_nat(void) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_nat", 0);

  /* "util.pxd":52
 * 
 * cdef inline int64_t get_nat():
 *     return NPY_MIN_INT64             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = NPY_MIN_INT64;
  goto __pyx_L0;

  /* "util.pxd":51
 * 
 * 
 * cdef inline int64_t get_nat():             # <<<<<<<<<<<<<<
 *     return NPY_MIN_INT64
 * 
 */

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

/* "util.pxd":58
 * # Type Checking
 * 
 * cdef inline bint is_integer_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_integer_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "util.pxd":76
 *     This counts np.timedelta64 objects as integers.
 *     """
 *     return (not PyBool_Check(obj) and PyArray_IsIntegerScalar(obj)             # <<<<<<<<<<<<<<
 *             and not is_timedelta64_object(obj))
 * 
 */
  __pyx_t_2 = ((!(PyBool_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "util.pxd":77
 *     """
 *     return (not PyBool_Check(obj) and PyArray_IsIntegerScalar(obj)
 *             and not is_timedelta64_object(obj))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PyArray_IsIntegerScalar(__pyx_v_obj) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_f_6pandas_5_libs_6tslibs_4util_is_timedelta64_object(__pyx_v_obj) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":58
 * # Type Checking
 * 
 * cdef inline bint is_integer_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":80
 * 
 * 
 * cdef inline bint is_float_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, (float, np.complex_))`
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_float_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "util.pxd":92
 *     is_float : bool
 *     """
 *     return (PyFloat_Check(obj) or             # <<<<<<<<<<<<<<
 *             (PyObject_TypeCheck(obj, &PyFloatingArrType_Type)))
 * 
 */
  __pyx_t_2 = (PyFloat_Check(__pyx_v_obj) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "util.pxd":93
 *     """
 *     return (PyFloat_Check(obj) or
 *             (PyObject_TypeCheck(obj, &PyFloatingArrType_Type)))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PyObject_TypeCheck(__pyx_v_obj, (&PyFloatingArrType_Type)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":80
 * 
 * 
 * cdef inline bint is_float_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, (float, np.complex_))`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":96
 * 
 * 
 * cdef inline bint is_complex_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, (complex, np.complex_))`
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_complex_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "util.pxd":108
 *     is_complex : bool
 *     """
 *     return (PyComplex_Check(obj) or             # <<<<<<<<<<<<<<
 *             PyObject_TypeCheck(obj, &PyComplexFloatingArrType_Type))
 * 
 */
  __pyx_t_2 = (PyComplex_Check(__pyx_v_obj) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "util.pxd":109
 *     """
 *     return (PyComplex_Check(obj) or
 *             PyObject_TypeCheck(obj, &PyComplexFloatingArrType_Type))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PyObject_TypeCheck(__pyx_v_obj, (&PyComplexFloatingArrType_Type)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":96
 * 
 * 
 * cdef inline bint is_complex_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, (complex, np.complex_))`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":112
 * 
 * 
 * cdef inline bint is_bool_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, (bool, np.bool_))`
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_bool_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "util.pxd":124
 *     is_bool : bool
 *     """
 *     return (PyBool_Check(obj) or             # <<<<<<<<<<<<<<
 *             PyObject_TypeCheck(obj, &PyBoolArrType_Type))
 * 
 */
  __pyx_t_2 = (PyBool_Check(__pyx_v_obj) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "util.pxd":125
 *     """
 *     return (PyBool_Check(obj) or
 *             PyObject_TypeCheck(obj, &PyBoolArrType_Type))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PyObject_TypeCheck(__pyx_v_obj, (&PyBoolArrType_Type)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":112
 * 
 * 
 * cdef inline bint is_bool_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, (bool, np.bool_))`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":128
 * 
 * 
 * cdef inline bint is_real_number_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     return is_bool_object(obj) or is_integer_object(obj) or is_float_object(obj)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_real_number_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "util.pxd":129
 * 
 * cdef inline bint is_real_number_object(object obj) nogil:
 *     return is_bool_object(obj) or is_integer_object(obj) or is_float_object(obj)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_bool_object(__pyx_v_obj) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_integer_object(__pyx_v_obj) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_float_object(__pyx_v_obj) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":128
 * 
 * 
 * cdef inline bint is_real_number_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     return is_bool_object(obj) or is_integer_object(obj) or is_float_object(obj)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":132
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, np.timedelta64)`
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "util.pxd":144
 *     is_timedelta64 : bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "util.pxd":132
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, np.timedelta64)`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":147
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, np.datetime64)`
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "util.pxd":159
 *     is_datetime64 : bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "util.pxd":147
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, np.datetime64)`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "util.pxd":162
 * 
 * 
 * cdef inline bint is_array(object val):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, np.ndarray)`
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_array(PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_array", 0);

  /* "util.pxd":174
 *     is_ndarray : bool
 *     """
 *     return PyArray_Check(val)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyArray_Check(__pyx_v_val);
  goto __pyx_L0;

  /* "util.pxd":162
 * 
 * 
 * cdef inline bint is_array(object val):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(val, np.ndarray)`
 */

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

/* "util.pxd":177
 * 
 * 
 * cdef inline bint is_nan(object val):             # <<<<<<<<<<<<<<
 *     """
 *     Check if val is a Not-A-Number float or complex, including
 */

static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6tslibs_4util_is_nan(PyObject *__pyx_v_val) {
  __pyx_t_5numpy_float64_t __pyx_v_fval;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __pyx_t_5numpy_float64_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_nan", 0);

  /* "util.pxd":191
 *     """
 *     cdef float64_t fval
 *     if is_float_object(val):             # <<<<<<<<<<<<<<
 *         fval = val
 *         return fval != fval
 */
  __pyx_t_1 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_float_object(__pyx_v_val) != 0);
  if (__pyx_t_1) {

    /* "util.pxd":192
 *     cdef float64_t fval
 *     if is_float_object(val):
 *         fval = val             # <<<<<<<<<<<<<<
 *         return fval != fval
 *     return is_complex_object(val) and val != val
 */
    __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_2 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(5, 192, __pyx_L1_error)
    __pyx_v_fval = __pyx_t_2;

    /* "util.pxd":193
 *     if is_float_object(val):
 *         fval = val
 *         return fval != fval             # <<<<<<<<<<<<<<
 *     return is_complex_object(val) and val != val
 * 
 */
    __pyx_r = (__pyx_v_fval != __pyx_v_fval);
    goto __pyx_L0;

    /* "util.pxd":191
 *     """
 *     cdef float64_t fval
 *     if is_float_object(val):             # <<<<<<<<<<<<<<
 *         fval = val
 *         return fval != fval
 */
  }

  /* "util.pxd":194
 *         fval = val
 *         return fval != fval
 *     return is_complex_object(val) and val != val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = (__pyx_f_6pandas_5_libs_6tslibs_4util_is_complex_object(__pyx_v_val) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 194, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":177
 * 
 * 
 * cdef inline bint is_nan(object val):             # <<<<<<<<<<<<<<
 *     """
 *     Check if val is a Not-A-Number float or complex, including
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pandas._libs.tslibs.util.is_nan", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":197
 * 
 * 
 * cdef inline const char* get_c_string_buf_and_size(str py_string,             # <<<<<<<<<<<<<<
 *                                                   Py_ssize_t *length) except NULL:
 *     """
 */

static CYTHON_INLINE char const *__pyx_f_6pandas_5_libs_6tslibs_4util_get_c_string_buf_and_size(PyObject *__pyx_v_py_string, Py_ssize_t *__pyx_v_length) {
  char const *__pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_c_string_buf_and_size", 0);

  /* "util.pxd":217
 *     buf : const char*
 *     """
 *     return PyUnicode_AsUTF8AndSize(py_string, length)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyUnicode_AsUTF8AndSize(__pyx_v_py_string, __pyx_v_length); if (unlikely(__pyx_t_1 == ((char const *)NULL))) __PYX_ERR(5, 217, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":197
 * 
 * 
 * cdef inline const char* get_c_string_buf_and_size(str py_string,             # <<<<<<<<<<<<<<
 *                                                   Py_ssize_t *length) except NULL:
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.util.get_c_string_buf_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":220
 * 
 * 
 * cdef inline const char* get_c_string(str py_string) except NULL:             # <<<<<<<<<<<<<<
 *     return get_c_string_buf_and_size(py_string, NULL)
 */

static CYTHON_INLINE char const *__pyx_f_6pandas_5_libs_6tslibs_4util_get_c_string(PyObject *__pyx_v_py_string) {
  char const *__pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_c_string", 0);

  /* "util.pxd":221
 * 
 * cdef inline const char* get_c_string(str py_string) except NULL:
 *     return get_c_string_buf_and_size(py_string, NULL)             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __pyx_f_6pandas_5_libs_6tslibs_4util_get_c_string_buf_and_size(__pyx_v_py_string, NULL); if (unlikely(__pyx_t_1 == ((char const *)NULL))) __PYX_ERR(5, 221, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "util.pxd":220
 * 
 * 
 * cdef inline const char* get_c_string(str py_string) except NULL:             # <<<<<<<<<<<<<<
 *     return get_c_string_buf_and_size(py_string, NULL)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._libs.tslibs.util.get_c_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BaseOffset(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)o);
  p->_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_cache);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)o;
  if (p->_cache) {
    e = (*v)(p->_cache, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset *)o;
  tmp = ((PyObject*)p->_cache);
  p->_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_richcompare_6pandas_5_libs_6tslibs_7offsets_BaseOffset(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_3__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5__ne__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_kwds(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4kwds_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4base_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset__prefix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7_prefix_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_nanos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_5nanos_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_n(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1n_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_normalize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9normalize_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset__cache(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_6_cache_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BaseOffset[] = {
  {"_params", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_9_params, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_8_params},
  {"__radd__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_13__radd__, METH_O|METH_COEXIST, 0},
  {"__rsub__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_17__rsub__, METH_O|METH_COEXIST, 0},
  {"apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_21apply, METH_O, 0},
  {"__rmul__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_25__rmul__, METH_O|METH_COEXIST, 0},
  {"copy", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_29copy, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_28copy},
  {"_repr_attrs", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_33_repr_attrs, METH_NOARGS, 0},
  {"freqstr", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_35freqstr, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_34freqstr},
  {"_offset_str", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_37_offset_str, METH_NOARGS, 0},
  {"apply_index", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_39apply_index, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_38apply_index},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_41_apply_array, METH_O, 0},
  {"rollback", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_43rollback, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_42rollback},
  {"rollforward", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_45rollforward, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_44rollforward},
  {"_get_offset_day", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_47_get_offset_day, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_49is_on_offset, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_48is_on_offset},
  {"_validate_n", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_51_validate_n, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_50_validate_n},
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_53__setstate__, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_52__setstate__},
  {"__getstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_55__getstate__, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_54__getstate__},
  {"onOffset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_57onOffset, METH_O, 0},
  {"isAnchored", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_59isAnchored, METH_NOARGS, 0},
  {"is_anchored", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_61is_anchored, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_60is_anchored},
  {"is_month_start", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_63is_month_start, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_62is_month_start},
  {"is_month_end", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_65is_month_end, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_64is_month_end},
  {"is_quarter_start", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_67is_quarter_start, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_66is_quarter_start},
  {"is_quarter_end", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_69is_quarter_end, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_68is_quarter_end},
  {"is_year_start", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_71is_year_start, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_70is_year_start},
  {"is_year_end", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_73is_year_end, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_72is_year_end},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_75__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_77__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_BaseOffset[] = {
  {(char *)"kwds", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_kwds, 0, (char *)"\n        Return a dict of extra parameters for the offset.\n\n        Examples\n        --------\n        >>> pd.DateOffset(5).kwds\n        {}\n\n        >>> pd.offsets.FY5253Quarter().kwds\n        {'weekday': 0,\n         'startingMonth': 1,\n         'qtr_with_extra_week': 1,\n         'variation': 'nearest'}\n        ", 0},
  {(char *)"base", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_base, 0, (char *)"\n        Returns a copy of the calling offset object with n=1 and all other\n        attributes equal.\n        ", 0},
  {(char *)"name", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_name, 0, (char *)"\n        Return a string representing the base frequency.\n\n        Examples\n        --------\n        >>> pd.offsets.Hour().name\n        'H'\n\n        >>> pd.offsets.Hour(5).name\n        'H'\n        ", 0},
  {(char *)"_prefix", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset__prefix, 0, (char *)0, 0},
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_rule_code, 0, (char *)0, 0},
  {(char *)"nanos", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_nanos, 0, (char *)0, 0},
  {(char *)"n", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_n, 0, (char *)0, 0},
  {(char *)"normalize", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_normalize, 0, (char *)0, 0},
  {(char *)"_cache", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10BaseOffset__cache, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_BaseOffset = {
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_11__add__, /*nb_add*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_15__sub__, /*nb_subtract*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_23__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_27__neg__, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BaseOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BaseOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  &__pyx_tp_as_number_BaseOffset, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_7__hash__, /*tp_hash*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__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*/
  "\n    Base class for DateOffset methods that are not overridden by subclasses.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  __pyx_tp_richcompare_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BaseOffset(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset[] = {
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_1_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_23SingleConstructorOffset_3__reduce__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.SingleConstructorOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Tick;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  return o;
}

static PyObject *__pyx_tp_richcompare_6pandas_5_libs_6tslibs_7offsets_Tick(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_13__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_15__ne__(o1, o2);
    }
    case Py_LT: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_19__lt__(o1, o2);
    }
    case Py_GT: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_23__gt__(o1, o2);
    }
    case Py_LE: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_17__le__(o1, o2);
    }
    case Py_GE: {
      return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_21__ge__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Tick_delta(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5delta_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Tick_nanos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5nanos_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_Tick[] = {
  {"_next_higher_resolution", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_3_next_higher_resolution, METH_NOARGS, 0},
  {"_repr_attrs", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_5_repr_attrs, METH_NOARGS, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_7is_on_offset, METH_O, 0},
  {"is_anchored", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_9is_anchored, METH_NOARGS, 0},
  {"__rmul__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_27__rmul__, METH_O|METH_COEXIST, 0},
  {"__rtruediv__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_31__rtruediv__, METH_O|METH_COEXIST, 0},
  {"__radd__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_35__radd__, METH_O|METH_COEXIST, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_37_apply, METH_O, 0},
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_39__setstate__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_Tick[] = {
  {(char *)"delta", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Tick_delta, 0, (char *)0, 0},
  {(char *)"nanos", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Tick_nanos, 0, (char *)"\n        Return an integer of the total number of nanoseconds.\n\n        Raises\n        ------\n        ValueError\n            If the frequency is non-fixed.\n\n        Examples\n        --------\n        >>> pd.offsets.Hour(5).nanos\n        18000000000000\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Tick = {
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_33__add__, /*nb_add*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_15__sub__, /*nb_subtract*/
  #else
  0, /*nb_subtract*/
  #endif
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_25__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_27__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_29__truediv__, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Tick", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_Tick, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_11__hash__, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  __pyx_tp_richcompare_6pandas_5_libs_6tslibs_7offsets_Tick, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_Tick, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_Tick, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Day __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Day;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Day(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Day *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Day *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Day;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Day = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Day", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Day), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Day, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Hour __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Hour;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Hour(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Hour *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Hour *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Hour;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Hour", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Hour), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Hour, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Minute __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Minute;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Minute(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Minute *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Minute *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Minute;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Minute", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Minute), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Minute, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Second __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Second;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Second(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Second *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Second *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Second;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Second = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Second", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Second), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Second, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Milli __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Milli;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Milli(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Milli *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Milli *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Milli;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Milli", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Milli), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Milli, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Micro __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Micro;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Micro(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Micro *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Micro *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Micro;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Micro", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Micro), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Micro, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Nano __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Nano;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Nano(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Nano *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Tick(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Nano *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Tick*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Nano;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Nano", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Nano), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Tick_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Nano, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BaseOffset(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_3__getstate__, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_2__getstate__},
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_5__setstate__, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_4__setstate__},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_7_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_9_apply_array, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_11is_on_offset, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.RelativeDeltaOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset subclass backed by a dateutil relativedelta object.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_19RelativeDeltaOffset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  p->_offset = ((PyDateTime_Delta *)Py_None); Py_INCREF(Py_None);
  p->weekmask = Py_None; Py_INCREF(Py_None);
  p->holidays = Py_None; Py_INCREF(Py_None);
  p->calendar = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_offset);
  Py_CLEAR(p->weekmask);
  Py_CLEAR(p->holidays);
  Py_CLEAR(p->calendar);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o);
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)o;
  e = __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o, v, a); if (e) return e;
  if (p->_offset) {
    e = (*v)(((PyObject *)p->_offset), a); if (e) return e;
  }
  if (p->weekmask) {
    e = (*v)(p->weekmask, a); if (e) return e;
  }
  if (p->holidays) {
    e = (*v)(p->holidays, a); if (e) return e;
  }
  if (p->calendar) {
    e = (*v)(p->calendar, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *)o;
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o);
  tmp = ((PyObject*)p->_offset);
  p->_offset = ((PyDateTime_Delta *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->weekmask);
  p->weekmask = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->holidays);
  p->holidays = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->calendar);
  p->calendar = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_6offset_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin__offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7_offset_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_weekmask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8weekmask_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_holidays(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8holidays_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_calendar(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_8calendar_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BusinessMixin[] = {
  {"_init_custom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_3_init_custom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_2_init_custom},
  {"_repr_attrs", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_5_repr_attrs, METH_NOARGS, 0},
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_7__setstate__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_BusinessMixin[] = {
  {(char *)"offset", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_offset, 0, (char *)"\n        Alias for self._offset.\n        ", 0},
  {(char *)"_offset", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin__offset, 0, (char *)0, 0},
  {(char *)"weekmask", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_weekmask, 0, (char *)0, 0},
  {(char *)"holidays", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_holidays, 0, (char *)0, 0},
  {(char *)"calendar", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_calendar, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BusinessMixin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Mixin to business types to provide related functions.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessDay __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessDay;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessDay(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessDay;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BusinessDay[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_1__setstate__, METH_O, 0},
  {"_offset_str", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_3_offset_str, METH_NOARGS, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_5_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_7_apply_array, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11BusinessDay_9is_on_offset, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BusinessDay", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessDay), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset subclass representing possibly n business days.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 8, 5)\n    >>> ts + pd.offsets.BusinessDay()\n    Timestamp('2022-08-08 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BusinessDay, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessDay, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessHour __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessHour;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessHour(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessHour;
  p->start = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->end = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessHour(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->start);
  Py_CLEAR(p->end);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(o);
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessHour(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)o;
  e = __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(o, v, a); if (e) return e;
  if (p->start) {
    e = (*v)(p->start, a); if (e) return e;
  }
  if (p->end) {
    e = (*v)(p->end, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessHour(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)o;
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(o);
  tmp = ((PyObject*)p->start);
  p->start = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->end);
  p->end = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_start(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5start_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_end(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3end_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BusinessHour[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_3__setstate__, METH_O, 0},
  {"_repr_attrs", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_5_repr_attrs, METH_NOARGS, 0},
  {"_get_business_hours_by_sec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_7_get_business_hours_by_sec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_6_get_business_hours_by_sec},
  {"_get_closing_time", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_9_get_closing_time, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_8_get_closing_time},
  {"next_bday", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_11next_bday, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_10next_bday},
  {"_next_opening_time", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_13_next_opening_time, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_12_next_opening_time},
  {"_prev_opening_time", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_15_prev_opening_time, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_14_prev_opening_time},
  {"rollback", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_17rollback, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_16rollback},
  {"rollforward", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_19rollforward, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_18rollforward},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_21_apply, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_23is_on_offset, METH_O, 0},
  {"_is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_25_is_on_offset, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_24_is_on_offset},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_BusinessHour[] = {
  {(char *)"start", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_start, 0, (char *)0, 0},
  {(char *)"end", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_end, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BusinessHour", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset subclass representing possibly n business hours.\n\n    Parameters\n    ----------\n    n : int, default 1\n        The number of months represented.\n    normalize : bool, default False\n        Normalize start/end dates to midnight before generating date range.\n    weekmask : str, Default 'Mon Tue Wed Thu Fri'\n        Weekmask of valid business days, passed to ``numpy.busdaycalendar``.\n    start : str, default \"09:00\"\n        Start time of your custom business hour in 24h format.\n    end : str, default: \"17:00\"\n        End time of your custom business hour in 24h format.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 8, 5, 16)\n    >>> ts + pd.offsets.BusinessHour()\n    Timestamp('2022-08-08 09:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_12BusinessHour_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_weekday(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_7weekday_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_week(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_4week_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin[] = {
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_3_apply, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_5is_on_offset, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_rule_code, 0, (char *)0, 0},
  {(char *)"weekday", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_weekday, 0, (char *)0, 0},
  {(char *)"week", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_week, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.WeekOfMonthMixin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Mixin for methods common to WeekOfMonth and LastWeekOfMonth.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_16WeekOfMonthMixin_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearOffset;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10YearOffset_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10YearOffset_month(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5month_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_YearOffset[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_3__setstate__, METH_O, 0},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_5_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_7is_on_offset, METH_O, 0},
  {"_get_offset_day", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_9_get_offset_day, METH_O, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_11_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_13_apply_array, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_YearOffset[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10YearOffset_rule_code, 0, (char *)0, 0},
  {(char *)"month", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10YearOffset_month, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.YearOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset that just needs a month.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_YearOffset, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_YearOffset, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BYearEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BYearEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BYearEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearEnd;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BYearEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between the last business day of the year.\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import BYearEnd\n    >>> ts = pd.Timestamp('2020-05-24 05:01:15')\n    >>> ts - BYearEnd()\n    Timestamp('2019-12-31 05:01:15')\n    >>> ts + BYearEnd()\n    Timestamp('2020-12-31 05:01:15')\n    >>> ts + BYearEnd(3)\n    Timestamp('2022-12-30 05:01:15')\n    >>> ts + BYearEnd(-3)\n    Timestamp('2017-12-29 05:01:15')\n    >>> ts + BYearEnd(month=11)\n    Timestamp('2020-11-30 05:01:15')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BYearEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BYearBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BYearBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BYearBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BYearBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BYearBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between the first business day of the year.\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import BYearBegin\n    >>> ts = pd.Timestamp('2020-05-24 05:01:15')\n    >>> ts + BYearBegin()\n    Timestamp('2021-01-01 05:01:15')\n    >>> ts - BYearBegin()\n    Timestamp('2020-01-01 05:01:15')\n    >>> ts + BYearBegin(-1)\n    Timestamp('2020-01-01 05:01:15')\n    >>> ts + BYearBegin(2)\n    Timestamp('2022-01-03 05:01:15')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BYearBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearEnd;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_7YearEnd__period_dtype_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_7YearEnd_18_period_dtype_code_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_YearEnd[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_YearEnd[] = {
  {(char *)"_period_dtype_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_7YearEnd__period_dtype_code, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.YearEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between calendar year ends.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.YearEnd()\n    Timestamp('2022-12-31 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_YearEnd, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_YearEnd, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_7YearEnd_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_YearOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.YearBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between calendar year begin dates.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.YearBegin()\n    Timestamp('2023-01-01 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10YearOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_YearBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_startingMonth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13startingMonth_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_QuarterOffset[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_3__setstate__, METH_O, 0},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_5_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {"is_anchored", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_7is_anchored, METH_NOARGS, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_9is_on_offset, METH_O, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_11_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_13_apply_array, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_QuarterOffset[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_rule_code, 0, (char *)0, 0},
  {(char *)"startingMonth", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_startingMonth, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.QuarterOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_QuarterOffset, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_QuarterOffset, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BQuarterEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between the last business day of each Quarter.\n\n    startingMonth = 1 corresponds to dates like 1/31/2007, 4/30/2007, ...\n    startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ...\n    startingMonth = 3 corresponds to dates like 3/30/2007, 6/29/2007, ...\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import BQuarterEnd\n    >>> ts = pd.Timestamp('2020-05-24 05:01:15')\n    >>> ts + BQuarterEnd()\n    Timestamp('2020-06-30 05:01:15')\n    >>> ts + BQuarterEnd(2)\n    Timestamp('2020-09-30 05:01:15')\n    >>> ts + BQuarterEnd(1, startingMonth=2)\n    Timestamp('2020-05-29 05:01:15')\n    >>> ts + BQuarterEnd(startingMonth=2)\n    Timestamp('2020-05-29 05:01:15')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BQuarterBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between the first business day of each Quarter.\n\n    startingMonth = 1 corresponds to dates like 1/01/2007, 4/01/2007, ...\n    startingMonth = 2 corresponds to dates like 2/01/2007, 5/01/2007, ...\n    startingMonth = 3 corresponds to dates like 3/01/2007, 6/01/2007, ...\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import BQuarterBegin\n    >>> ts = pd.Timestamp('2020-05-24 05:01:15')\n    >>> ts + BQuarterBegin()\n    Timestamp('2020-06-01 05:01:15')\n    >>> ts + BQuarterBegin(2)\n    Timestamp('2020-09-01 05:01:15')\n    >>> ts + BQuarterBegin(startingMonth=2)\n    Timestamp('2020-08-03 05:01:15')\n    >>> ts + BQuarterBegin(-1)\n    Timestamp('2020-03-02 05:01:15')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterEnd;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd__period_dtype_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_18_period_dtype_code_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_QuarterEnd[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_QuarterEnd[] = {
  {(char *)"_period_dtype_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd__period_dtype_code, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.QuarterEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between Quarter end dates.\n\n    startingMonth = 1 corresponds to dates like 1/31/2007, 4/30/2007, ...\n    startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ...\n    startingMonth = 3 corresponds to dates like 3/31/2007, 6/30/2007, ...\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.QuarterEnd()\n    Timestamp('2022-03-31 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_QuarterEnd, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_QuarterEnd, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10QuarterEnd_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_QuarterOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.QuarterBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between Quarter start dates.\n\n    startingMonth = 1 corresponds to dates like 1/01/2007, 4/01/2007, ...\n    startingMonth = 2 corresponds to dates like 2/01/2007, 5/01/2007, ...\n    startingMonth = 3 corresponds to dates like 3/01/2007, 6/01/2007, ...\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.QuarterBegin()\n    Timestamp('2022-03-01 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_QuarterBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthOffset;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_MonthOffset[] = {
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_1is_on_offset, METH_O, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_3_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_5_apply_array, METH_O, 0},
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11MonthOffset_7__setstate__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.MonthOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_MonthOffset, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthEnd;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.MonthEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset of one month end.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.MonthEnd()\n    Timestamp('2022-01-31 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.MonthBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset of one month at beginning.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.MonthBegin()\n    Timestamp('2022-02-01 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BusinessMonthEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between the last business day of the month.\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import BMonthEnd\n    >>> ts = pd.Timestamp('2020-05-24 05:01:15')\n    >>> ts + BMonthEnd()\n    Timestamp('2020-05-29 05:01:15')\n    >>> ts + BMonthEnd(2)\n    Timestamp('2020-06-30 05:01:15')\n    >>> ts + BMonthEnd(-2)\n    Timestamp('2020-03-31 05:01:15')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_MonthOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_MonthOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.BusinessMonthBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset of one month at the first business day.\n\n    Examples\n    --------\n    >>> from pandas.tseries.offsets import BMonthBegin\n    >>> ts=pd.Timestamp('2020-05-24 05:01:15')\n    >>> ts + BMonthBegin()\n    Timestamp('2020-06-01 05:01:15')\n    >>> ts + BMonthBegin(2)\n    Timestamp('2020-07-01 05:01:15')\n    >>> ts + BMonthBegin(-3)\n    Timestamp('2020-03-02 05:01:15')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_day_of_month(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_12day_of_month_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_3__setstate__, METH_O, 0},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_5_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_7_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_9_apply_array, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_rule_code, 0, (char *)0, 0},
  {(char *)"day_of_month", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_day_of_month, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.SemiMonthOffset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd[] = {
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_12SemiMonthEnd_1is_on_offset, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.SemiMonthEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Two DateOffset's per month repeating on the last day of the month & day_of_month.\n\n    Parameters\n    ----------\n    n : int\n    normalize : bool, default False\n    day_of_month : int, {1, 3,...,27}, default 15\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.SemiMonthEnd()\n    Timestamp('2022-01-15 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin[] = {
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_14SemiMonthBegin_1is_on_offset, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.SemiMonthBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Two DateOffset's per month repeating on the first day of the month & day_of_month.\n\n    Parameters\n    ----------\n    n : int\n    normalize : bool, default False\n    day_of_month : int, {2, 3,...,27}, default 15\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.SemiMonthBegin()\n    Timestamp('2022-01-15 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Week __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Week;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Week(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Week;
  p->weekday = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_Week(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->weekday);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o);
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_Week(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)o;
  e = __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o, v, a); if (e) return e;
  if (p->weekday) {
    e = (*v)(p->weekday, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_Week(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *)o;
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o);
  tmp = ((PyObject*)p->weekday);
  p->weekday = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Week_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Week_weekday(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_7weekday_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Week__period_dtype_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_18_period_dtype_code_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_Week[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_3__setstate__, METH_O, 0},
  {"is_anchored", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_5is_anchored, METH_NOARGS, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_7_apply, METH_O, 0},
  {"_apply_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_9_apply_array, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_11is_on_offset, METH_O, 0},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_13_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_Week[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Week_rule_code, 0, (char *)0, 0},
  {(char *)"weekday", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Week_weekday, 0, (char *)0, 0},
  {(char *)"_period_dtype_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_4Week__period_dtype_code, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Week = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Week", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_Week, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Weekly offset.\n\n    Parameters\n    ----------\n    weekday : int or None, default None\n        Always generate specific day of week. 0 for Monday.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.Week()\n    Timestamp('2022-01-08 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_Week, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_Week, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_Week, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_Week, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_4Week_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Week, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_3__setstate__, METH_O, 0},
  {"_get_offset_day", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_5_get_offset_day, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_4_get_offset_day},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_7_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.WeekOfMonth", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Describes monthly dates like \"the Tuesday of the 2nd week of each month\".\n\n    Parameters\n    ----------\n    n : int\n    week : int {0, 1, 2, 3, ...}, default 0\n        A specific integer for the week of the month.\n        e.g. 0 is 1st week of month, 1 is the 2nd week, etc.\n    weekday : int {0, 1, ..., 6}, default 0\n        A specific integer for the day of the week.\n\n        - 0 is Monday\n        - 1 is Tuesday\n        - 2 is Wednesday\n        - 3 is Thursday\n        - 4 is Friday\n        - 5 is Saturday\n        - 6 is Sunday.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.WeekOfMonth()\n    Timestamp('2022-01-03 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_3__setstate__, METH_O, 0},
  {"_get_offset_day", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_5_get_offset_day, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_4_get_offset_day},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_7_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.LastWeekOfMonth", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Describes monthly dates in last week of month.\n\n    For example \"the last Tuesday of each month\".\n\n    Parameters\n    ----------\n    n : int, default 1\n    weekday : int {0, 1, ..., 6}, default 0\n        A specific integer for the day of the week.\n\n        - 0 is Monday\n        - 1 is Tuesday\n        - 2 is Wednesday\n        - 3 is Thursday\n        - 4 is Friday\n        - 5 is Saturday\n        - 6 is Sunday.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.LastWeekOfMonth()\n    Timestamp('2022-01-31 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  p->variation = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->variation);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_startingMonth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_13startingMonth_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_weekday(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7weekday_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_variation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9variation_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_3__setstate__, METH_O, 0},
  {"is_anchored", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_5is_anchored, METH_NOARGS, 0},
  {"_get_suffix_prefix", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_7_get_suffix_prefix, METH_NOARGS, 0},
  {"get_rule_code_suffix", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_9get_rule_code_suffix, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_rule_code, 0, (char *)0, 0},
  {(char *)"startingMonth", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_startingMonth, 0, (char *)0, 0},
  {(char *)"weekday", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_weekday, 0, (char *)0, 0},
  {(char *)"variation", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_variation, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.FY5253Mixin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253 __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253 *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_FY5253[] = {
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_1is_on_offset, METH_O, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_3_apply, METH_O, 0},
  {"get_year_end", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_5get_year_end, METH_O, 0},
  {"_parse_suffix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_7_parse_suffix, METH_VARARGS|METH_KEYWORDS, 0},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6FY5253_9_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253 = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.FY5253", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    Describes 52-53 week fiscal year. This is also known as a 4-4-5 calendar.\n\n    It is used by companies that desire that their\n    fiscal year always end on the same day of the week.\n\n    It is a method of managing accounting periods.\n    It is a common calendar structure for some industries,\n    such as retail, manufacturing and parking industry.\n\n    For more information see:\n    https://en.wikipedia.org/wiki/4-4-5_calendar\n\n    The year may either:\n\n    - end on the last X day of the Y month.\n    - end on the last X day closest to the last day of the Y month.\n\n    X is a specific day of the week.\n    Y is a certain month of the year\n\n    Parameters\n    ----------\n    n : int\n    weekday : int {0, 1, ..., 6}, default 0\n        A specific integer for the day of the week.\n\n        - 0 is Monday\n        - 1 is Tuesday\n        - 2 is Wednesday\n        - 3 is Thursday\n        - 4 is Friday\n        - 5 is Saturday\n        - 6 is Sunday.\n\n    startingMonth : int {1, 2, ... 12}, default 1\n        The month in which the fiscal year ends.\n\n    variation : str, default \"nearest\"\n        Method of employing 4-4-5 calendar.\n\n        There are two options:\n\n        - \"nearest\" means year end is **weekday** closest to last day of month in year.\n        - \"last\" means year end is final **weekday** of the final month in fiscal year.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.FY5253()\n    Timestamp('2022-01-31 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_FY5253, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter;
  return o;
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_rule_code(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9rule_code_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_qtr_with_extra_week(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_19qtr_with_extra_week_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_3__setstate__, METH_O, 0},
  {"_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_5_offset, METH_NOARGS, 0},
  {"_rollback_to_year", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_7_rollback_to_year, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_6_rollback_to_year},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_9_apply, METH_O, 0},
  {"get_weeks", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_11get_weeks, METH_O, 0},
  {"year_has_extra_week", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_13year_has_extra_week, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_15is_on_offset, METH_O, 0},
  {"_from_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_17_from_name, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter[] = {
  {(char *)"rule_code", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_rule_code, 0, (char *)0, 0},
  {(char *)"qtr_with_extra_week", __pyx_getprop_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_qtr_with_extra_week, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.FY5253Quarter", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset increments between business quarter dates for 52-53 week fiscal year.\n\n    Also known as a 4-4-5 calendar.\n\n    It is used by companies that desire that their\n    fiscal year always end on the same day of the week.\n\n    It is a method of managing accounting periods.\n    It is a common calendar structure for some industries,\n    such as retail, manufacturing and parking industry.\n\n    For more information see:\n    https://en.wikipedia.org/wiki/4-4-5_calendar\n\n    The year may either:\n\n    - end on the last X day of the Y month.\n    - end on the last X day closest to the last day of the Y month.\n\n    X is a specific day of the week.\n    Y is a certain month of the year\n\n    startingMonth = 1 corresponds to dates like 1/31/2007, 4/30/2007, ...\n    startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ...\n    startingMonth = 3 corresponds to dates like 3/30/2007, 6/29/2007, ...\n\n    Parameters\n    ----------\n    n : int\n    weekday : int {0, 1, ..., 6}, default 0\n        A specific integer for the day of the week.\n\n        - 0 is Monday\n        - 1 is Tuesday\n        - 2 is Wednesday\n        - 3 is Thursday\n        - 4 is Friday\n        - 5 is Saturday\n        - 6 is Sunday.\n\n    startingMonth : int {1, 2, ..., 12}, default 1\n        The month in which fiscal years end.\n\n    qtr_with_extra_week : int {1, 2, 3, 4}, default 1\n        The quarter number that has the leap or 14 week when needed.\n\n    variation : str, default \"nearest\"\n        Method of employing 4-4-5 calendar.\n\n        There are two options:\n\n        - \"nearest\" means year end is **weekday** closest to last day of month in year.\n        - \"last\" means year end is final **weekday** of the final month in fiscal year.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.FY5253Quarter()\n    Timestamp('2022-01-31 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_Easter __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Easter;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Easter(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Easter;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_Easter[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_1__setstate__, METH_O, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_3_apply, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_6Easter_5is_on_offset, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.Easter", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset for the Easter holiday using logic defined in dateutil.\n\n    Right now uses the revised method which is valid in years 1583-4099.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 1, 1)\n    >>> ts + pd.offsets.Easter()\n    Timestamp('2022-04-17 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BaseOffset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_Easter, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_Easter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessDay(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay[] = {
  {"__setstate__", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_3__setstate__, METH_O, 0},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_5_apply, METH_O, 0},
  {"is_on_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_7is_on_offset, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.CustomBusinessDay", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset subclass representing custom business days excluding holidays.\n\n    Parameters\n    ----------\n    n : int, default 1\n    normalize : bool, default False\n        Normalize start/end dates to midnight before generating date range.\n    weekmask : str, Default 'Mon Tue Wed Thu Fri'\n        Weekmask of valid business days, passed to ``numpy.busdaycalendar``.\n    holidays : list\n        List/array of dates to exclude from the set of valid business days,\n        passed to ``numpy.busdaycalendar``.\n    calendar : np.busdaycalendar\n    offset : timedelta, default timedelta(0)\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 8, 5)\n    >>> ts + pd.offsets.CustomBusinessDay(1)\n    Timestamp('2022-08-08 00:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessHour(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.CustomBusinessHour", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset subclass representing possibly n custom business days.\n\n    Parameters\n    ----------\n    n : int, default 1\n        The number of months represented.\n    normalize : bool, default False\n        Normalize start/end dates to midnight before generating date range.\n    weekmask : str, Default 'Mon Tue Wed Thu Fri'\n        Weekmask of valid business days, passed to ``numpy.busdaycalendar``.\n    start : str, default \"09:00\"\n        Start time of your custom business hour in 24h format.\n    end : str, default: \"17:00\"\n        End time of your custom business hour in 24h format.\n\n    Examples\n    --------\n    >>> ts = pd.Timestamp(2022, 8, 5, 16)\n    >>> ts + pd.offsets.CustomBusinessHour()\n    Timestamp('2022-08-08 09:00:00')\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessHour, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_18CustomBusinessHour_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth __pyx_vtable_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_BusinessMixin(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth[] = {
  {"cbday_roll", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_3cbday_roll, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_2cbday_roll},
  {"m_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_5m_offset, METH_NOARGS, 0},
  {"month_roll", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_7month_roll, METH_NOARGS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_6month_roll},
  {"_apply", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_9_apply, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets._CustomBusinessMonth", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  "\n    DateOffset subclass representing custom business month(s).\n\n    Increments between beginning/end of month dates.\n\n    Parameters\n    ----------\n    n : int, default 1\n        The number of months represented.\n    normalize : bool, default False\n        Normalize start/end dates to midnight before generating date range.\n    weekmask : str, Default 'Mon Tue Wed Thu Fri'\n        Weekmask of valid business days, passed to ``numpy.busdaycalendar``.\n    holidays : list\n        List/array of dates to exclude from the set of valid business days,\n        passed to ``numpy.busdaycalendar``.\n    calendar : np.busdaycalendar\n        Calendar to integrate.\n    offset : timedelta, default timedelta(0)\n        Time offset to apply.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.CustomBusinessMonthEnd", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin *p;
  PyObject *o = __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_7offsets_BusinessMixin*)__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin;
  return o;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.CustomBusinessMonthBegin", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_31__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_19__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets_BusinessMixin, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5_libs_6tslibs_7offsets_20_CustomBusinessMonth_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_func);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *)o;
  if (p->__pyx_v_func) {
    e = (*v)(p->__pyx_v_func, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps *)o;
  tmp = ((PyObject*)p->__pyx_v_func);
  p->__pyx_v_func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct__apply_array_wraps", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_func);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *)o;
  if (p->__pyx_v_func) {
    e = (*v)(p->__pyx_v_func, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps *)o;
  tmp = ((PyObject*)p->__pyx_v_func);
  p->__pyx_v_func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_1_apply_wraps", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v__kwds_use_relativedelta);
  Py_CLEAR(p->__pyx_v_kwds);
  Py_CLEAR(p->__pyx_v_kwds_no_nanos);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *)o;
  if (p->__pyx_v__kwds_use_relativedelta) {
    e = (*v)(p->__pyx_v__kwds_use_relativedelta, a); if (e) return e;
  }
  if (p->__pyx_v_kwds) {
    e = (*v)(p->__pyx_v_kwds, a); if (e) return e;
  }
  if (p->__pyx_v_kwds_no_nanos) {
    e = (*v)(p->__pyx_v_kwds_no_nanos, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset *)o;
  tmp = ((PyObject*)p->__pyx_v__kwds_use_relativedelta);
  p->__pyx_v__kwds_use_relativedelta = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_kwds);
  p->__pyx_v_kwds = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_kwds_no_nanos);
  p->__pyx_v_kwds_no_nanos = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_k);
  Py_CLEAR(p->__pyx_v_v);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_k) {
    e = (*v)(p->__pyx_v_k, a); if (e) return e;
  }
  if (p->__pyx_v_v) {
    e = (*v)(p->__pyx_v_v, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_3_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_k);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_k) {
    e = (*v)(p->__pyx_v_k, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_4_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_nano);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_5_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_6___reduce__", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_attr);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_attr) {
    e = (*v)(p->__pyx_v_attr, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_7_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_8__repr_attrs", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_en);
  Py_CLEAR(p->__pyx_v_st);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_en) {
    e = (*v)(p->__pyx_v_en, a); if (e) return e;
  }
  if (p->__pyx_v_st) {
    e = (*v)(p->__pyx_v_st, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_9_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessHour *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_10__apply", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr[8];
static int __pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr = 0;

static PyObject *__pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr[--__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_en);
  Py_CLEAR(p->__pyx_v_st);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr)))) {
    __pyx_freelist_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr[__pyx_freecount_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_en) {
    e = (*v)(p->__pyx_v_en, a); if (e) return e;
  }
  if (p->__pyx_v_st) {
    e = (*v)(p->__pyx_v_st, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pandas._libs.tslibs.offsets.__pyx_scope_struct_11_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {"to_offset", (PyCFunction)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_11to_offset, METH_O, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_10to_offset},
  {"roll_convention", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pandas_5_libs_6tslibs_7offsets_17roll_convention, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pandas_5_libs_6tslibs_7offsets_16roll_convention},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_offsets(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_offsets},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "offsets",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_02d, __pyx_k_02d, sizeof(__pyx_k_02d), 0, 1, 0, 0},
  {&__pyx_kp_u_09_00, __pyx_k_09_00, sizeof(__pyx_k_09_00), 0, 1, 0, 0},
  {&__pyx_kp_u_17_00, __pyx_k_17_00, sizeof(__pyx_k_17_00), 0, 1, 0, 0},
  {&__pyx_n_u_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 1, 0, 1},
  {&__pyx_n_u_AS, __pyx_k_AS, sizeof(__pyx_k_AS), 0, 1, 0, 1},
  {&__pyx_kp_u_AS_JAN, __pyx_k_AS_JAN, sizeof(__pyx_k_AS_JAN), 0, 1, 0, 0},
  {&__pyx_kp_u_A_DEC, __pyx_k_A_DEC, sizeof(__pyx_k_A_DEC), 0, 1, 0, 0},
  {&__pyx_n_s_ApplyTypeError, __pyx_k_ApplyTypeError, sizeof(__pyx_k_ApplyTypeError), 0, 0, 1, 1},
  {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_u_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 1, 0, 1},
  {&__pyx_n_u_BA, __pyx_k_BA, sizeof(__pyx_k_BA), 0, 1, 0, 1},
  {&__pyx_n_u_BAS, __pyx_k_BAS, sizeof(__pyx_k_BAS), 0, 1, 0, 1},
  {&__pyx_kp_u_BAS_JAN, __pyx_k_BAS_JAN, sizeof(__pyx_k_BAS_JAN), 0, 1, 0, 0},
  {&__pyx_kp_u_BA_DEC, __pyx_k_BA_DEC, sizeof(__pyx_k_BA_DEC), 0, 1, 0, 0},
  {&__pyx_n_s_BDay, __pyx_k_BDay, sizeof(__pyx_k_BDay), 0, 0, 1, 1},
  {&__pyx_n_u_BH, __pyx_k_BH, sizeof(__pyx_k_BH), 0, 1, 0, 1},
  {&__pyx_n_u_BM, __pyx_k_BM, sizeof(__pyx_k_BM), 0, 1, 0, 1},
  {&__pyx_n_u_BMS, __pyx_k_BMS, sizeof(__pyx_k_BMS), 0, 1, 0, 1},
  {&__pyx_n_s_BMonthBegin, __pyx_k_BMonthBegin, sizeof(__pyx_k_BMonthBegin), 0, 0, 1, 1},
  {&__pyx_n_s_BMonthEnd, __pyx_k_BMonthEnd, sizeof(__pyx_k_BMonthEnd), 0, 0, 1, 1},
  {&__pyx_n_u_BQ, __pyx_k_BQ, sizeof(__pyx_k_BQ), 0, 1, 0, 1},
  {&__pyx_n_u_BQS, __pyx_k_BQS, sizeof(__pyx_k_BQS), 0, 1, 0, 1},
  {&__pyx_n_s_BQuarterBegin, __pyx_k_BQuarterBegin, sizeof(__pyx_k_BQuarterBegin), 0, 0, 1, 1},
  {&__pyx_n_s_BQuarterEnd, __pyx_k_BQuarterEnd, sizeof(__pyx_k_BQuarterEnd), 0, 0, 1, 1},
  {&__pyx_n_u_BY, __pyx_k_BY, sizeof(__pyx_k_BY), 0, 1, 0, 1},
  {&__pyx_n_u_BYS, __pyx_k_BYS, sizeof(__pyx_k_BYS), 0, 1, 0, 1},
  {&__pyx_n_s_BYearBegin, __pyx_k_BYearBegin, sizeof(__pyx_k_BYearBegin), 0, 0, 1, 1},
  {&__pyx_n_s_BYearEnd, __pyx_k_BYearEnd, sizeof(__pyx_k_BYearEnd), 0, 0, 1, 1},
  {&__pyx_kp_u_Bad_freq_suffix, __pyx_k_Bad_freq_suffix, sizeof(__pyx_k_Bad_freq_suffix), 0, 1, 0, 0},
  {&__pyx_n_s_BaseOffset, __pyx_k_BaseOffset, sizeof(__pyx_k_BaseOffset), 0, 0, 1, 1},
  {&__pyx_kp_u_BaseOffset_copy_line_538, __pyx_k_BaseOffset_copy_line_538, sizeof(__pyx_k_BaseOffset_copy_line_538), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_freqstr_line_614, __pyx_k_BaseOffset_freqstr_line_614, sizeof(__pyx_k_BaseOffset_freqstr_line_614), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_anchored_line_837, __pyx_k_BaseOffset_is_anchored_line_837, sizeof(__pyx_k_BaseOffset_is_anchored_line_837), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_month_end_line_867, __pyx_k_BaseOffset_is_month_end_line_867, sizeof(__pyx_k_BaseOffset_is_month_end_line_867), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_month_start_line_8, __pyx_k_BaseOffset_is_month_start_line_8, sizeof(__pyx_k_BaseOffset_is_month_start_line_8), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_on_offset_line_727, __pyx_k_BaseOffset_is_on_offset_line_727, sizeof(__pyx_k_BaseOffset_is_on_offset_line_727), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_quarter_end_line_8, __pyx_k_BaseOffset_is_quarter_end_line_8, sizeof(__pyx_k_BaseOffset_is_quarter_end_line_8), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_quarter_start_line, __pyx_k_BaseOffset_is_quarter_start_line, sizeof(__pyx_k_BaseOffset_is_quarter_start_line), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_year_end_line_919, __pyx_k_BaseOffset_is_year_end_line_919, sizeof(__pyx_k_BaseOffset_is_year_end_line_919), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_is_year_start_line_90, __pyx_k_BaseOffset_is_year_start_line_90, sizeof(__pyx_k_BaseOffset_is_year_start_line_90), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_kwds___get___line_437, __pyx_k_BaseOffset_kwds___get___line_437, sizeof(__pyx_k_BaseOffset_kwds___get___line_437), 0, 1, 0, 0},
  {&__pyx_kp_u_BaseOffset_name___get___line_591, __pyx_k_BaseOffset_name___get___line_591, sizeof(__pyx_k_BaseOffset_name___get___line_591), 0, 1, 0, 0},
  {&__pyx_n_s_BusinessDay, __pyx_k_BusinessDay, sizeof(__pyx_k_BusinessDay), 0, 0, 1, 1},
  {&__pyx_n_s_BusinessHour, __pyx_k_BusinessHour, sizeof(__pyx_k_BusinessHour), 0, 0, 1, 1},
  {&__pyx_n_s_BusinessMixin, __pyx_k_BusinessMixin, sizeof(__pyx_k_BusinessMixin), 0, 0, 1, 1},
  {&__pyx_n_s_BusinessMonthBegin, __pyx_k_BusinessMonthBegin, sizeof(__pyx_k_BusinessMonthBegin), 0, 0, 1, 1},
  {&__pyx_n_s_BusinessMonthEnd, __pyx_k_BusinessMonthEnd, sizeof(__pyx_k_BusinessMonthEnd), 0, 0, 1, 1},
  {&__pyx_n_u_BusinessQuarterBegin, __pyx_k_BusinessQuarterBegin, sizeof(__pyx_k_BusinessQuarterBegin), 0, 1, 0, 1},
  {&__pyx_n_u_BusinessQuarterEnd, __pyx_k_BusinessQuarterEnd, sizeof(__pyx_k_BusinessQuarterEnd), 0, 1, 0, 1},
  {&__pyx_n_u_BusinessYearBegin, __pyx_k_BusinessYearBegin, sizeof(__pyx_k_BusinessYearBegin), 0, 1, 0, 1},
  {&__pyx_n_u_BusinessYearEnd, __pyx_k_BusinessYearEnd, sizeof(__pyx_k_BusinessYearEnd), 0, 1, 0, 1},
  {&__pyx_n_u_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 1, 0, 1},
  {&__pyx_n_u_CBH, __pyx_k_CBH, sizeof(__pyx_k_CBH), 0, 1, 0, 1},
  {&__pyx_n_u_CBM, __pyx_k_CBM, sizeof(__pyx_k_CBM), 0, 1, 0, 1},
  {&__pyx_n_u_CBMS, __pyx_k_CBMS, sizeof(__pyx_k_CBMS), 0, 1, 0, 1},
  {&__pyx_n_s_CBMonthBegin, __pyx_k_CBMonthBegin, sizeof(__pyx_k_CBMonthBegin), 0, 0, 1, 1},
  {&__pyx_n_s_CBMonthEnd, __pyx_k_CBMonthEnd, sizeof(__pyx_k_CBMonthEnd), 0, 0, 1, 1},
  {&__pyx_n_s_CDay, __pyx_k_CDay, sizeof(__pyx_k_CDay), 0, 0, 1, 1},
  {&__pyx_kp_u_Cannot_add, __pyx_k_Cannot_add, sizeof(__pyx_k_Cannot_add), 0, 1, 0, 0},
  {&__pyx_kp_u_Cannot_subtract_datetime_from_of, __pyx_k_Cannot_subtract_datetime_from_of, sizeof(__pyx_k_Cannot_subtract_datetime_from_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_convert_to_integer_off, __pyx_k_Could_not_convert_to_integer_off, sizeof(__pyx_k_Could_not_convert_to_integer_off), 0, 1, 0, 0},
  {&__pyx_n_s_CustomBusinessDay, __pyx_k_CustomBusinessDay, sizeof(__pyx_k_CustomBusinessDay), 0, 0, 1, 1},
  {&__pyx_n_s_CustomBusinessHour, __pyx_k_CustomBusinessHour, sizeof(__pyx_k_CustomBusinessHour), 0, 0, 1, 1},
  {&__pyx_n_s_CustomBusinessMonth, __pyx_k_CustomBusinessMonth, sizeof(__pyx_k_CustomBusinessMonth), 0, 0, 1, 1},
  {&__pyx_n_s_CustomBusinessMonthBegin, __pyx_k_CustomBusinessMonthBegin, sizeof(__pyx_k_CustomBusinessMonthBegin), 0, 0, 1, 1},
  {&__pyx_n_s_CustomBusinessMonthEnd, __pyx_k_CustomBusinessMonthEnd, sizeof(__pyx_k_CustomBusinessMonthEnd), 0, 0, 1, 1},
  {&__pyx_n_u_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 1, 0, 1},
  {&__pyx_n_s_DateOffset, __pyx_k_DateOffset, sizeof(__pyx_k_DateOffset), 0, 0, 1, 1},
  {&__pyx_kp_u_DateOffset___call___is_deprecate, __pyx_k_DateOffset___call___is_deprecate, sizeof(__pyx_k_DateOffset___call___is_deprecate), 0, 1, 0, 0},
  {&__pyx_n_s_DateOffset___setattr, __pyx_k_DateOffset___setattr, sizeof(__pyx_k_DateOffset___setattr), 0, 0, 1, 1},
  {&__pyx_kp_u_DateOffset_objects_are_immutable, __pyx_k_DateOffset_objects_are_immutable, sizeof(__pyx_k_DateOffset_objects_are_immutable), 0, 1, 0, 0},
  {&__pyx_kp_u_DateOffset_subclass, __pyx_k_DateOffset_subclass, sizeof(__pyx_k_DateOffset_subclass), 0, 1, 0, 0},
  {&__pyx_kp_u_DateOffset_with_relativedelta_ke, __pyx_k_DateOffset_with_relativedelta_ke, sizeof(__pyx_k_DateOffset_with_relativedelta_ke), 0, 1, 0, 0},
  {&__pyx_n_s_Day, __pyx_k_Day, sizeof(__pyx_k_Day), 0, 0, 1, 1},
  {&__pyx_kp_u_Day_must_be_0_day_6_got, __pyx_k_Day_must_be_0_day_6_got, sizeof(__pyx_k_Day_must_be_0_day_6_got), 0, 1, 0, 0},
  {&__pyx_n_s_Easter, __pyx_k_Easter, sizeof(__pyx_k_Easter), 0, 0, 1, 1},
  {&__pyx_n_s_FY5253, __pyx_k_FY5253, sizeof(__pyx_k_FY5253), 0, 0, 1, 1},
  {&__pyx_n_s_FY5253Mixin, __pyx_k_FY5253Mixin, sizeof(__pyx_k_FY5253Mixin), 0, 0, 1, 1},
  {&__pyx_n_s_FY5253Quarter, __pyx_k_FY5253Quarter, sizeof(__pyx_k_FY5253Quarter), 0, 0, 1, 1},
  {&__pyx_n_s_FutureWarning, __pyx_k_FutureWarning, sizeof(__pyx_k_FutureWarning), 0, 0, 1, 1},
  {&__pyx_n_u_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 1, 0, 1},
  {&__pyx_kp_u_H_M, __pyx_k_H_M, sizeof(__pyx_k_H_M), 0, 1, 0, 0},
  {&__pyx_n_s_Hour, __pyx_k_Hour, sizeof(__pyx_k_Hour), 0, 0, 1, 1},
  {&__pyx_n_s_INVALID_FREQ_ERR_MSG, __pyx_k_INVALID_FREQ_ERR_MSG, sizeof(__pyx_k_INVALID_FREQ_ERR_MSG), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_kp_u_Invalid_frequency_0, __pyx_k_Invalid_frequency_0, sizeof(__pyx_k_Invalid_frequency_0), 0, 1, 0, 0},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_u_L, __pyx_k_L, sizeof(__pyx_k_L), 0, 1, 0, 1},
  {&__pyx_n_u_LWOM, __pyx_k_LWOM, sizeof(__pyx_k_LWOM), 0, 1, 0, 1},
  {&__pyx_n_s_LastWeekOfMonth, __pyx_k_LastWeekOfMonth, sizeof(__pyx_k_LastWeekOfMonth), 0, 0, 1, 1},
  {&__pyx_n_u_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 1, 0, 1},
  {&__pyx_n_s_MONTH_ALIASES, __pyx_k_MONTH_ALIASES, sizeof(__pyx_k_MONTH_ALIASES), 0, 0, 1, 1},
  {&__pyx_n_s_MONTH_TO_CAL_NUM, __pyx_k_MONTH_TO_CAL_NUM, sizeof(__pyx_k_MONTH_TO_CAL_NUM), 0, 0, 1, 1},
  {&__pyx_n_u_MS, __pyx_k_MS, sizeof(__pyx_k_MS), 0, 1, 0, 1},
  {&__pyx_kp_s_Metaclass_that_allows_us_to_pre, __pyx_k_Metaclass_that_allows_us_to_pre, sizeof(__pyx_k_Metaclass_that_allows_us_to_pre), 0, 0, 1, 0},
  {&__pyx_n_s_Micro, __pyx_k_Micro, sizeof(__pyx_k_Micro), 0, 0, 1, 1},
  {&__pyx_n_s_Milli, __pyx_k_Milli, sizeof(__pyx_k_Milli), 0, 0, 1, 1},
  {&__pyx_n_u_Min, __pyx_k_Min, sizeof(__pyx_k_Min), 0, 1, 0, 1},
  {&__pyx_n_s_Minute, __pyx_k_Minute, sizeof(__pyx_k_Minute), 0, 0, 1, 1},
  {&__pyx_kp_u_Mon_Tue_Wed_Thu_Fri, __pyx_k_Mon_Tue_Wed_Thu_Fri, sizeof(__pyx_k_Mon_Tue_Wed_Thu_Fri), 0, 1, 0, 0},
  {&__pyx_n_s_MonthBegin, __pyx_k_MonthBegin, sizeof(__pyx_k_MonthBegin), 0, 0, 1, 1},
  {&__pyx_n_s_MonthEnd, __pyx_k_MonthEnd, sizeof(__pyx_k_MonthEnd), 0, 0, 1, 1},
  {&__pyx_n_s_MonthOffset, __pyx_k_MonthOffset, sizeof(__pyx_k_MonthOffset), 0, 0, 1, 1},
  {&__pyx_kp_u_Month_must_go_from_1_to_12, __pyx_k_Month_must_go_from_1_to_12, sizeof(__pyx_k_Month_must_go_from_1_to_12), 0, 1, 0, 0},
  {&__pyx_kp_u_Must_include_at_least_1_end_time, __pyx_k_Must_include_at_least_1_end_time, sizeof(__pyx_k_Must_include_at_least_1_end_time), 0, 1, 0, 0},
  {&__pyx_kp_u_Must_include_at_least_1_start_ti, __pyx_k_Must_include_at_least_1_start_ti, sizeof(__pyx_k_Must_include_at_least_1_start_ti), 0, 1, 0, 0},
  {&__pyx_n_u_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 1, 0, 1},
  {&__pyx_kp_u_N_cannot_be_0, __pyx_k_N_cannot_be_0, sizeof(__pyx_k_N_cannot_be_0), 0, 1, 0, 0},
  {&__pyx_n_s_Nano, __pyx_k_Nano, sizeof(__pyx_k_Nano), 0, 0, 1, 1},
  {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_OffsetMeta, __pyx_k_OffsetMeta, sizeof(__pyx_k_OffsetMeta), 0, 0, 1, 1},
  {&__pyx_n_s_OffsetMeta___instancecheck, __pyx_k_OffsetMeta___instancecheck, sizeof(__pyx_k_OffsetMeta___instancecheck), 0, 0, 1, 1},
  {&__pyx_n_s_OffsetMeta___subclasscheck, __pyx_k_OffsetMeta___subclasscheck, sizeof(__pyx_k_OffsetMeta___subclasscheck), 0, 0, 1, 1},
  {&__pyx_kp_u_Offset_apply_index_other_is_dep, __pyx_k_Offset_apply_index_other_is_dep, sizeof(__pyx_k_Offset_apply_index_other_is_dep), 0, 1, 0, 0},
  {&__pyx_kp_u_Only_know_how_to_combine_busines, __pyx_k_Only_know_how_to_combine_busines, sizeof(__pyx_k_Only_know_how_to_combine_busines), 0, 1, 0, 0},
  {&__pyx_kp_u_Only_know_how_to_combine_trading, __pyx_k_Only_know_how_to_combine_trading, sizeof(__pyx_k_Only_know_how_to_combine_trading), 0, 1, 0, 0},
  {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_kp_u_Prefix, __pyx_k_Prefix, sizeof(__pyx_k_Prefix), 0, 1, 0, 0},
  {&__pyx_kp_u_Prefix_not_defined, __pyx_k_Prefix_not_defined, sizeof(__pyx_k_Prefix_not_defined), 0, 1, 0, 0},
  {&__pyx_n_u_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 1, 0, 1},
  {&__pyx_n_u_QS, __pyx_k_QS, sizeof(__pyx_k_QS), 0, 1, 0, 1},
  {&__pyx_kp_u_Q_DEC, __pyx_k_Q_DEC, sizeof(__pyx_k_Q_DEC), 0, 1, 0, 0},
  {&__pyx_n_s_QuarterBegin, __pyx_k_QuarterBegin, sizeof(__pyx_k_QuarterBegin), 0, 0, 1, 1},
  {&__pyx_n_s_QuarterEnd, __pyx_k_QuarterEnd, sizeof(__pyx_k_QuarterEnd), 0, 0, 1, 1},
  {&__pyx_n_s_QuarterOffset, __pyx_k_QuarterOffset, sizeof(__pyx_k_QuarterOffset), 0, 0, 1, 1},
  {&__pyx_n_u_RE, __pyx_k_RE, sizeof(__pyx_k_RE), 0, 1, 0, 1},
  {&__pyx_n_u_REQ, __pyx_k_REQ, sizeof(__pyx_k_REQ), 0, 1, 0, 1},
  {&__pyx_n_s_RelativeDeltaOffset, __pyx_k_RelativeDeltaOffset, sizeof(__pyx_k_RelativeDeltaOffset), 0, 0, 1, 1},
  {&__pyx_kp_u_Return_DateOffset_object_from_s, __pyx_k_Return_DateOffset_object_from_s, sizeof(__pyx_k_Return_DateOffset_object_from_s), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_a_copy_of_the_frequency, __pyx_k_Return_a_copy_of_the_frequency, sizeof(__pyx_k_Return_a_copy_of_the_frequency), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_a_dict_of_extra_paramete, __pyx_k_Return_a_dict_of_extra_paramete, sizeof(__pyx_k_Return_a_dict_of_extra_paramete), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_a_string_representing_th, __pyx_k_Return_a_string_representing_th, sizeof(__pyx_k_Return_a_string_representing_th), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_a_string_representing_th_2, __pyx_k_Return_a_string_representing_th_2, sizeof(__pyx_k_Return_a_string_representing_th_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_an_integer_of_the_total, __pyx_k_Return_an_integer_of_the_total, sizeof(__pyx_k_Return_an_integer_of_the_total), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest, __pyx_k_Return_boolean_whether_a_timest, sizeof(__pyx_k_Return_boolean_whether_a_timest), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest_2, __pyx_k_Return_boolean_whether_a_timest_2, sizeof(__pyx_k_Return_boolean_whether_a_timest_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest_3, __pyx_k_Return_boolean_whether_a_timest_3, sizeof(__pyx_k_Return_boolean_whether_a_timest_3), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest_4, __pyx_k_Return_boolean_whether_a_timest_4, sizeof(__pyx_k_Return_boolean_whether_a_timest_4), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest_5, __pyx_k_Return_boolean_whether_a_timest_5, sizeof(__pyx_k_Return_boolean_whether_a_timest_5), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest_6, __pyx_k_Return_boolean_whether_a_timest_6, sizeof(__pyx_k_Return_boolean_whether_a_timest_6), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_a_timest_7, __pyx_k_Return_boolean_whether_a_timest_7, sizeof(__pyx_k_Return_boolean_whether_a_timest_7), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_boolean_whether_the_freq, __pyx_k_Return_boolean_whether_the_freq, sizeof(__pyx_k_Return_boolean_whether_the_freq), 0, 1, 0, 0},
  {&__pyx_n_u_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 1, 0, 1},
  {&__pyx_n_u_SM, __pyx_k_SM, sizeof(__pyx_k_SM), 0, 1, 0, 1},
  {&__pyx_n_u_SMS, __pyx_k_SMS, sizeof(__pyx_k_SMS), 0, 1, 0, 1},
  {&__pyx_n_s_Second, __pyx_k_Second, sizeof(__pyx_k_Second), 0, 0, 1, 1},
  {&__pyx_n_s_SemiMonthBegin, __pyx_k_SemiMonthBegin, sizeof(__pyx_k_SemiMonthBegin), 0, 0, 1, 1},
  {&__pyx_n_s_SemiMonthEnd, __pyx_k_SemiMonthEnd, sizeof(__pyx_k_SemiMonthEnd), 0, 0, 1, 1},
  {&__pyx_n_s_SemiMonthOffset, __pyx_k_SemiMonthOffset, sizeof(__pyx_k_SemiMonthOffset), 0, 0, 1, 1},
  {&__pyx_n_s_SingleConstructorOffset, __pyx_k_SingleConstructorOffset, sizeof(__pyx_k_SingleConstructorOffset), 0, 0, 1, 1},
  {&__pyx_kp_s_Standard_kind_of_date_increment, __pyx_k_Standard_kind_of_date_increment, sizeof(__pyx_k_Standard_kind_of_date_increment), 0, 0, 1, 0},
  {&__pyx_n_u_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 1, 0, 1},
  {&__pyx_n_s_Tick, __pyx_k_Tick, sizeof(__pyx_k_Tick), 0, 0, 1, 1},
  {&__pyx_kp_u_Tick_nanos___get___line_1001, __pyx_k_Tick_nanos___get___line_1001, sizeof(__pyx_k_Tick_nanos___get___line_1001), 0, 1, 0, 0},
  {&__pyx_kp_u_Tick_offset_with_normalize_True, __pyx_k_Tick_offset_with_normalize_True, sizeof(__pyx_k_Tick_offset_with_normalize_True), 0, 1, 0, 0},
  {&__pyx_n_s_Timedelta, __pyx_k_Timedelta, sizeof(__pyx_k_Timedelta), 0, 0, 1, 1},
  {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_u_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 1, 0, 1},
  {&__pyx_kp_u_Unable_to_parse_varion_code, __pyx_k_Unable_to_parse_varion_code, sizeof(__pyx_k_Unable_to_parse_varion_code), 0, 1, 0, 0},
  {&__pyx_kp_u_Unexpected_key__offset, __pyx_k_Unexpected_key__offset, sizeof(__pyx_k_Unexpected_key__offset), 0, 1, 0, 0},
  {&__pyx_kp_u_Unhandled_type, __pyx_k_Unhandled_type, sizeof(__pyx_k_Unhandled_type), 0, 1, 0, 0},
  {&__pyx_kp_u_Using_DateOffset_to_replace_mill, __pyx_k_Using_DateOffset_to_replace_mill, sizeof(__pyx_k_Using_DateOffset_to_replace_mill), 0, 1, 0, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_u_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 1, 0, 1},
  {&__pyx_n_u_WOM, __pyx_k_WOM, sizeof(__pyx_k_WOM), 0, 1, 0, 1},
  {&__pyx_kp_u_W_SUN, __pyx_k_W_SUN, sizeof(__pyx_k_W_SUN), 0, 1, 0, 0},
  {&__pyx_n_s_Week, __pyx_k_Week, sizeof(__pyx_k_Week), 0, 0, 1, 1},
  {&__pyx_n_s_WeekOfMonth, __pyx_k_WeekOfMonth, sizeof(__pyx_k_WeekOfMonth), 0, 0, 1, 1},
  {&__pyx_n_s_WeekOfMonthMixin, __pyx_k_WeekOfMonthMixin, sizeof(__pyx_k_WeekOfMonthMixin), 0, 0, 1, 1},
  {&__pyx_kp_u_Week_must_be_0_week_3_got, __pyx_k_Week_must_be_0_week_3_got, sizeof(__pyx_k_Week_must_be_0_week_3_got), 0, 1, 0, 0},
  {&__pyx_n_u_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 1, 0, 1},
  {&__pyx_n_u_YS, __pyx_k_YS, sizeof(__pyx_k_YS), 0, 1, 0, 1},
  {&__pyx_n_s_YearBegin, __pyx_k_YearBegin, sizeof(__pyx_k_YearBegin), 0, 0, 1, 1},
  {&__pyx_n_s_YearEnd, __pyx_k_YearEnd, sizeof(__pyx_k_YearEnd), 0, 0, 1, 1},
  {&__pyx_n_s_YearOffset, __pyx_k_YearOffset, sizeof(__pyx_k_YearOffset), 0, 0, 1, 1},
  {&__pyx_n_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 1},
  {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0},
  {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0},
  {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0},
  {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
  {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
  {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
  {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
  {&__pyx_kp_u__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 1, 0, 0},
  {&__pyx_kp_u__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 1, 0, 0},
  {&__pyx_kp_u__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 1, 0, 0},
  {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0},
  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  {&__pyx_n_s_adjust_dst, __pyx_k_adjust_dst, sizeof(__pyx_k_adjust_dst), 0, 0, 1, 1},
  {&__pyx_n_s_anchor, __pyx_k_anchor, sizeof(__pyx_k_anchor), 0, 0, 1, 1},
  {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
  {&__pyx_n_s_apply, __pyx_k_apply, sizeof(__pyx_k_apply), 0, 0, 1, 1},
  {&__pyx_n_s_apply_array, __pyx_k_apply_array, sizeof(__pyx_k_apply_array), 0, 0, 1, 1},
  {&__pyx_n_s_apply_array_wraps, __pyx_k_apply_array_wraps, sizeof(__pyx_k_apply_array_wraps), 0, 0, 1, 1},
  {&__pyx_n_s_apply_array_wraps_locals_wrapper, __pyx_k_apply_array_wraps_locals_wrapper, sizeof(__pyx_k_apply_array_wraps_locals_wrapper), 0, 0, 1, 1},
  {&__pyx_kp_u_apply_is_deprecated_and_will_be, __pyx_k_apply_is_deprecated_and_will_be, sizeof(__pyx_k_apply_is_deprecated_and_will_be), 0, 1, 0, 0},
  {&__pyx_n_s_apply_locals_genexpr, __pyx_k_apply_locals_genexpr, sizeof(__pyx_k_apply_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_apply_wrapper_core, __pyx_k_apply_wrapper_core, sizeof(__pyx_k_apply_wrapper_core), 0, 0, 1, 1},
  {&__pyx_n_s_apply_wraps, __pyx_k_apply_wraps, sizeof(__pyx_k_apply_wraps), 0, 0, 1, 1},
  {&__pyx_n_s_apply_wraps_locals_wrapper, __pyx_k_apply_wraps_locals_wrapper, sizeof(__pyx_k_apply_wraps_locals_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_array_priority, __pyx_k_array_priority, sizeof(__pyx_k_array_priority), 0, 0, 1, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_astimezone, __pyx_k_astimezone, sizeof(__pyx_k_astimezone), 0, 0, 1, 1},
  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
  {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
  {&__pyx_n_u_backward, __pyx_k_backward, sizeof(__pyx_k_backward), 0, 1, 0, 1},
  {&__pyx_n_s_busday_offset, __pyx_k_busday_offset, sizeof(__pyx_k_busday_offset), 0, 0, 1, 1},
  {&__pyx_n_s_busdaycal, __pyx_k_busdaycal, sizeof(__pyx_k_busdaycal), 0, 0, 1, 1},
  {&__pyx_n_s_busdaycalendar, __pyx_k_busdaycalendar, sizeof(__pyx_k_busdaycalendar), 0, 0, 1, 1},
  {&__pyx_n_u_business_end, __pyx_k_business_end, sizeof(__pyx_k_business_end), 0, 1, 0, 1},
  {&__pyx_n_u_business_start, __pyx_k_business_start, sizeof(__pyx_k_business_start), 0, 1, 0, 1},
  {&__pyx_n_u_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 1, 0, 1},
  {&__pyx_n_s_cache_readonly, __pyx_k_cache_readonly, sizeof(__pyx_k_cache_readonly), 0, 0, 1, 1},
  {&__pyx_n_s_calendar, __pyx_k_calendar, sizeof(__pyx_k_calendar), 0, 0, 1, 1},
  {&__pyx_n_u_calendar, __pyx_k_calendar, sizeof(__pyx_k_calendar), 0, 1, 0, 1},
  {&__pyx_n_s_cbday_roll, __pyx_k_cbday_roll, sizeof(__pyx_k_cbday_roll), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_combine, __pyx_k_combine, sizeof(__pyx_k_combine), 0, 0, 1, 1},
  {&__pyx_n_s_compare, __pyx_k_compare, sizeof(__pyx_k_compare), 0, 0, 1, 1},
  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_kp_u_d_d_d_s_A_Za_z_dA_Za_z, __pyx_k_d_d_d_s_A_Za_z_dA_Za_z, sizeof(__pyx_k_d_d_d_s_A_Za_z_dA_Za_z), 0, 1, 0, 0},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_n_s_datetime64, __pyx_k_datetime64, sizeof(__pyx_k_datetime64), 0, 0, 1, 1},
  {&__pyx_kp_u_datetime64_D, __pyx_k_datetime64_D, sizeof(__pyx_k_datetime64_D), 0, 1, 0, 0},
  {&__pyx_n_s_dateutil_easter, __pyx_k_dateutil_easter, sizeof(__pyx_k_dateutil_easter), 0, 0, 1, 1},
  {&__pyx_n_s_dateutil_relativedelta, __pyx_k_dateutil_relativedelta, sizeof(__pyx_k_dateutil_relativedelta), 0, 0, 1, 1},
  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
  {&__pyx_n_u_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 1, 0, 1},
  {&__pyx_kp_u_day_must_be_None_start_end_busin, __pyx_k_day_must_be_None_start_end_busin, sizeof(__pyx_k_day_must_be_None_start_end_busin), 0, 1, 0, 0},
  {&__pyx_n_s_day_of_month, __pyx_k_day_of_month, sizeof(__pyx_k_day_of_month), 0, 0, 1, 1},
  {&__pyx_n_u_day_of_month, __pyx_k_day_of_month, sizeof(__pyx_k_day_of_month), 0, 1, 0, 1},
  {&__pyx_kp_u_day_of_month_27_got, __pyx_k_day_of_month_27_got, sizeof(__pyx_k_day_of_month_27_got), 0, 1, 0, 0},
  {&__pyx_kp_u_day_of_month_must_be, __pyx_k_day_of_month_must_be, sizeof(__pyx_k_day_of_month_must_be), 0, 1, 0, 0},
  {&__pyx_n_s_day_opt, __pyx_k_day_opt, sizeof(__pyx_k_day_opt), 0, 0, 1, 1},
  {&__pyx_n_s_day_opt_2, __pyx_k_day_opt_2, sizeof(__pyx_k_day_opt_2), 0, 0, 1, 1},
  {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
  {&__pyx_n_u_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 1, 0, 1},
  {&__pyx_n_s_days_in_month, __pyx_k_days_in_month, sizeof(__pyx_k_days_in_month), 0, 0, 1, 1},
  {&__pyx_n_s_default_day_of_month, __pyx_k_default_day_of_month, sizeof(__pyx_k_default_day_of_month), 0, 0, 1, 1},
  {&__pyx_n_s_default_month, __pyx_k_default_month, sizeof(__pyx_k_default_month), 0, 0, 1, 1},
  {&__pyx_n_s_default_starting_month, __pyx_k_default_starting_month, sizeof(__pyx_k_default_starting_month), 0, 0, 1, 1},
  {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1},
  {&__pyx_n_s_delta_to_tick, __pyx_k_delta_to_tick, sizeof(__pyx_k_delta_to_tick), 0, 0, 1, 1},
  {&__pyx_n_s_deprecations, __pyx_k_deprecations, sizeof(__pyx_k_deprecations), 0, 0, 1, 1},
  {&__pyx_n_s_determine_offset_locals_genexpr, __pyx_k_determine_offset_locals_genexpr, sizeof(__pyx_k_determine_offset_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_u_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 1, 0, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_kp_u_does_not_have_a_vectorized_impl, __pyx_k_does_not_have_a_vectorized_impl, sizeof(__pyx_k_does_not_have_a_vectorized_impl), 0, 1, 0, 0},
  {&__pyx_n_s_dont_uppercase, __pyx_k_dont_uppercase, sizeof(__pyx_k_dont_uppercase), 0, 0, 1, 1},
  {&__pyx_n_s_dtindex, __pyx_k_dtindex, sizeof(__pyx_k_dtindex), 0, 0, 1, 1},
  {&__pyx_n_s_dts, __pyx_k_dts, sizeof(__pyx_k_dts), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_dy, __pyx_k_dy, sizeof(__pyx_k_dy), 0, 0, 1, 1},
  {&__pyx_n_s_easter, __pyx_k_easter, sizeof(__pyx_k_easter), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_u_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 1, 0, 1},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
  {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
  {&__pyx_n_s_find_stack_level, __pyx_k_find_stack_level, sizeof(__pyx_k_find_stack_level), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_u_forward, __pyx_k_forward, sizeof(__pyx_k_forward), 0, 1, 0, 1},
  {&__pyx_n_s_freqstr, __pyx_k_freqstr, sizeof(__pyx_k_freqstr), 0, 0, 1, 1},
  {&__pyx_n_s_from_name, __pyx_k_from_name, sizeof(__pyx_k_from_name), 0, 0, 1, 1},
  {&__pyx_n_s_from_name_starting_month, __pyx_k_from_name_starting_month, sizeof(__pyx_k_from_name_starting_month), 0, 0, 1, 1},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_ge, __pyx_k_ge, sizeof(__pyx_k_ge), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_2, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1},
  {&__pyx_n_s_get_business_hours_by_sec, __pyx_k_get_business_hours_by_sec, sizeof(__pyx_k_get_business_hours_by_sec), 0, 0, 1, 1},
  {&__pyx_n_s_get_closing_time, __pyx_k_get_closing_time, sizeof(__pyx_k_get_closing_time), 0, 0, 1, 1},
  {&__pyx_n_s_get_offset, __pyx_k_get_offset, sizeof(__pyx_k_get_offset), 0, 0, 1, 1},
  {&__pyx_n_s_get_offset_day, __pyx_k_get_offset_day, sizeof(__pyx_k_get_offset_day), 0, 0, 1, 1},
  {&__pyx_n_s_get_rule_code_suffix, __pyx_k_get_rule_code_suffix, sizeof(__pyx_k_get_rule_code_suffix), 0, 0, 1, 1},
  {&__pyx_n_s_get_str, __pyx_k_get_str, sizeof(__pyx_k_get_str), 0, 0, 1, 1},
  {&__pyx_n_s_get_suffix_prefix, __pyx_k_get_suffix_prefix, sizeof(__pyx_k_get_suffix_prefix), 0, 0, 1, 1},
  {&__pyx_n_s_get_weeks, __pyx_k_get_weeks, sizeof(__pyx_k_get_weeks), 0, 0, 1, 1},
  {&__pyx_n_s_get_year_end, __pyx_k_get_year_end, sizeof(__pyx_k_get_year_end), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_gt, __pyx_k_gt, sizeof(__pyx_k_gt), 0, 0, 1, 1},
  {&__pyx_n_u_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 1, 0, 1},
  {&__pyx_n_s_holidays, __pyx_k_holidays, sizeof(__pyx_k_holidays), 0, 0, 1, 1},
  {&__pyx_n_u_holidays, __pyx_k_holidays, sizeof(__pyx_k_holidays), 0, 1, 0, 1},
  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
  {&__pyx_n_u_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 1, 0, 1},
  {&__pyx_n_u_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 1, 0, 1},
  {&__pyx_n_s_hrs, __pyx_k_hrs, sizeof(__pyx_k_hrs), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_u_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 1, 0, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_u_inc, __pyx_k_inc, sizeof(__pyx_k_inc), 0, 1, 0, 1},
  {&__pyx_n_s_inc_2, __pyx_k_inc_2, sizeof(__pyx_k_inc_2), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init_custom, __pyx_k_init_custom, sizeof(__pyx_k_init_custom), 0, 0, 1, 1},
  {&__pyx_n_s_instancecheck, __pyx_k_instancecheck, sizeof(__pyx_k_instancecheck), 0, 0, 1, 1},
  {&__pyx_n_s_int_to_weekday, __pyx_k_int_to_weekday, sizeof(__pyx_k_int_to_weekday), 0, 0, 1, 1},
  {&__pyx_kp_u_invalid_starting_and_ending_time, __pyx_k_invalid_starting_and_ending_time, sizeof(__pyx_k_invalid_starting_and_ending_time), 0, 1, 0, 0},
  {&__pyx_n_u_isAnchored, __pyx_k_isAnchored, sizeof(__pyx_k_isAnchored), 0, 1, 0, 1},
  {&__pyx_kp_u_isAnchored_is_a_deprecated_use_i, __pyx_k_isAnchored_is_a_deprecated_use_i, sizeof(__pyx_k_isAnchored_is_a_deprecated_use_i), 0, 1, 0, 0},
  {&__pyx_kp_u_is_a_non_fixed_frequency, __pyx_k_is_a_non_fixed_frequency, sizeof(__pyx_k_is_a_non_fixed_frequency), 0, 1, 0, 0},
  {&__pyx_n_s_is_anchored, __pyx_k_is_anchored, sizeof(__pyx_k_is_anchored), 0, 0, 1, 1},
  {&__pyx_n_s_is_busday, __pyx_k_is_busday, sizeof(__pyx_k_is_busday), 0, 0, 1, 1},
  {&__pyx_n_u_is_month_end, __pyx_k_is_month_end, sizeof(__pyx_k_is_month_end), 0, 1, 0, 1},
  {&__pyx_n_u_is_month_start, __pyx_k_is_month_start, sizeof(__pyx_k_is_month_start), 0, 1, 0, 1},
  {&__pyx_kp_u_is_not_a_valid_variation, __pyx_k_is_not_a_valid_variation, sizeof(__pyx_k_is_not_a_valid_variation), 0, 1, 0, 0},
  {&__pyx_n_s_is_on_offset, __pyx_k_is_on_offset, sizeof(__pyx_k_is_on_offset), 0, 0, 1, 1},
  {&__pyx_n_s_is_on_offset_2, __pyx_k_is_on_offset_2, sizeof(__pyx_k_is_on_offset_2), 0, 0, 1, 1},
  {&__pyx_n_u_is_quarter_end, __pyx_k_is_quarter_end, sizeof(__pyx_k_is_quarter_end), 0, 1, 0, 1},
  {&__pyx_n_u_is_quarter_start, __pyx_k_is_quarter_start, sizeof(__pyx_k_is_quarter_start), 0, 1, 0, 1},
  {&__pyx_n_u_is_year_end, __pyx_k_is_year_end, sizeof(__pyx_k_is_year_end), 0, 1, 0, 1},
  {&__pyx_n_u_is_year_start, __pyx_k_is_year_start, sizeof(__pyx_k_is_year_start), 0, 1, 0, 1},
  {&__pyx_n_s_isclose, __pyx_k_isclose, sizeof(__pyx_k_isclose), 0, 0, 1, 1},
  {&__pyx_n_s_isspace, __pyx_k_isspace, sizeof(__pyx_k_isspace), 0, 0, 1, 1},
  {&__pyx_n_s_issubset, __pyx_k_issubset, sizeof(__pyx_k_issubset), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_klass, __pyx_k_klass, sizeof(__pyx_k_klass), 0, 0, 1, 1},
  {&__pyx_n_s_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 0, 1, 1},
  {&__pyx_n_u_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 1, 0, 1},
  {&__pyx_n_u_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 1, 0, 1},
  {&__pyx_kp_u_last_element_must_be_blank, __pyx_k_last_element_must_be_blank, sizeof(__pyx_k_last_element_must_be_blank), 0, 1, 0, 0},
  {&__pyx_n_s_le, __pyx_k_le, sizeof(__pyx_k_le), 0, 0, 1, 1},
  {&__pyx_n_s_lite_rule_alias, __pyx_k_lite_rule_alias, sizeof(__pyx_k_lite_rule_alias), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_lt, __pyx_k_lt, sizeof(__pyx_k_lt), 0, 0, 1, 1},
  {&__pyx_n_u_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 1, 0, 1},
  {&__pyx_n_s_m_offset, __pyx_k_m_offset, sizeof(__pyx_k_m_offset), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_mi, __pyx_k_mi, sizeof(__pyx_k_mi), 0, 0, 1, 1},
  {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1},
  {&__pyx_n_u_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 1, 0, 1},
  {&__pyx_n_s_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1},
  {&__pyx_n_u_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 1, 0, 1},
  {&__pyx_n_u_millisecond, __pyx_k_millisecond, sizeof(__pyx_k_millisecond), 0, 1, 0, 1},
  {&__pyx_n_u_milliseconds, __pyx_k_milliseconds, sizeof(__pyx_k_milliseconds), 0, 1, 0, 1},
  {&__pyx_n_u_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 1, 0, 1},
  {&__pyx_n_s_min_day_of_month, __pyx_k_min_day_of_month, sizeof(__pyx_k_min_day_of_month), 0, 0, 1, 1},
  {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
  {&__pyx_n_u_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 1, 0, 1},
  {&__pyx_n_s_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 0, 0, 1, 1},
  {&__pyx_n_u_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 0, 1, 0, 1},
  {&__pyx_n_s_modby, __pyx_k_modby, sizeof(__pyx_k_modby), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
  {&__pyx_n_u_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 1, 0, 1},
  {&__pyx_n_s_month_roll, __pyx_k_month_roll, sizeof(__pyx_k_month_roll), 0, 0, 1, 1},
  {&__pyx_n_s_months, __pyx_k_months, sizeof(__pyx_k_months), 0, 0, 1, 1},
  {&__pyx_n_u_months, __pyx_k_months, sizeof(__pyx_k_months), 0, 1, 0, 1},
  {&__pyx_n_s_months_since, __pyx_k_months_since, sizeof(__pyx_k_months_since), 0, 0, 1, 1},
  {&__pyx_n_s_months_to_roll, __pyx_k_months_to_roll, sizeof(__pyx_k_months_to_roll), 0, 0, 1, 1},
  {&__pyx_n_u_ms, __pyx_k_ms, sizeof(__pyx_k_ms), 0, 1, 0, 1},
  {&__pyx_n_s_mts, __pyx_k_mts, sizeof(__pyx_k_mts), 0, 0, 1, 1},
  {&__pyx_n_s_mul, __pyx_k_mul, sizeof(__pyx_k_mul), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_u_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 1, 0, 1},
  {&__pyx_kp_u_n_argument_must_be_an_integer_g, __pyx_k_n_argument_must_be_an_integer_g, sizeof(__pyx_k_n_argument_must_be_an_integer_g), 0, 1, 0, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_u_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 0, 1},
  {&__pyx_n_s_nano, __pyx_k_nano, sizeof(__pyx_k_nano), 0, 0, 1, 1},
  {&__pyx_n_s_nanos, __pyx_k_nanos, sizeof(__pyx_k_nanos), 0, 0, 1, 1},
  {&__pyx_n_s_nanos_inc, __pyx_k_nanos_inc, sizeof(__pyx_k_nanos_inc), 0, 0, 1, 1},
  {&__pyx_n_s_nanosecond, __pyx_k_nanosecond, sizeof(__pyx_k_nanosecond), 0, 0, 1, 1},
  {&__pyx_n_u_nanosecond, __pyx_k_nanosecond, sizeof(__pyx_k_nanosecond), 0, 1, 0, 1},
  {&__pyx_n_s_nanoseconds, __pyx_k_nanoseconds, sizeof(__pyx_k_nanoseconds), 0, 0, 1, 1},
  {&__pyx_n_u_nanoseconds, __pyx_k_nanoseconds, sizeof(__pyx_k_nanoseconds), 0, 1, 0, 1},
  {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1},
  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
  {&__pyx_n_u_nearest, __pyx_k_nearest, sizeof(__pyx_k_nearest), 0, 1, 0, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_next_bday, __pyx_k_next_bday, sizeof(__pyx_k_next_bday), 0, 0, 1, 1},
  {&__pyx_n_u_next_bday, __pyx_k_next_bday, sizeof(__pyx_k_next_bday), 0, 1, 0, 1},
  {&__pyx_n_s_next_higher_resolution, __pyx_k_next_higher_resolution, sizeof(__pyx_k_next_higher_resolution), 0, 0, 1, 1},
  {&__pyx_n_s_next_opening_time, __pyx_k_next_opening_time, sizeof(__pyx_k_next_opening_time), 0, 0, 1, 1},
  {&__pyx_n_s_nint, __pyx_k_nint, sizeof(__pyx_k_nint), 0, 0, 1, 1},
  {&__pyx_n_s_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 0, 1, 1},
  {&__pyx_n_u_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 1, 0, 1},
  {&__pyx_n_s_normalize_i8_timestamps, __pyx_k_normalize_i8_timestamps, sizeof(__pyx_k_normalize_i8_timestamps), 0, 0, 1, 1},
  {&__pyx_kp_u_not_able_to_be_applied_vectoriz, __pyx_k_not_able_to_be_applied_vectoriz, sizeof(__pyx_k_not_able_to_be_applied_vectoriz), 0, 1, 0, 0},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_u_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 1, 0, 1},
  {&__pyx_kp_u_number_of_starting_time_and_endi, __pyx_k_number_of_starting_time_and_endi, sizeof(__pyx_k_number_of_starting_time_and_endi), 0, 1, 0, 0},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
  {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_off_str, __pyx_k_off_str, sizeof(__pyx_k_off_str), 0, 0, 1, 1},
  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
  {&__pyx_n_u_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 1, 0, 1},
  {&__pyx_n_s_offset_2, __pyx_k_offset_2, sizeof(__pyx_k_offset_2), 0, 0, 1, 1},
  {&__pyx_n_u_offset_2, __pyx_k_offset_2, sizeof(__pyx_k_offset_2), 0, 1, 0, 1},
  {&__pyx_kp_u_offset_3, __pyx_k_offset_3, sizeof(__pyx_k_offset_3), 0, 1, 0, 0},
  {&__pyx_n_s_offset_map, __pyx_k_offset_map, sizeof(__pyx_k_offset_map), 0, 0, 1, 1},
  {&__pyx_n_s_offset_str, __pyx_k_offset_str, sizeof(__pyx_k_offset_str), 0, 0, 1, 1},
  {&__pyx_n_s_offset_str_locals_get_str, __pyx_k_offset_str_locals_get_str, sizeof(__pyx_k_offset_str_locals_get_str), 0, 0, 1, 1},
  {&__pyx_n_u_onOffset, __pyx_k_onOffset, sizeof(__pyx_k_onOffset), 0, 1, 0, 1},
  {&__pyx_kp_u_onOffset_is_a_deprecated_use_is, __pyx_k_onOffset_is_a_deprecated_use_is, sizeof(__pyx_k_onOffset_is_a_deprecated_use_is), 0, 1, 0, 0},
  {&__pyx_n_s_opattern, __pyx_k_opattern, sizeof(__pyx_k_opattern), 0, 0, 1, 1},
  {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_outputName, __pyx_k_outputName, sizeof(__pyx_k_outputName), 0, 0, 1, 1},
  {&__pyx_n_s_output_name, __pyx_k_output_name, sizeof(__pyx_k_output_name), 0, 0, 1, 1},
  {&__pyx_n_u_output_name, __pyx_k_output_name, sizeof(__pyx_k_output_name), 0, 1, 0, 1},
  {&__pyx_n_s_pandas__libs_properties, __pyx_k_pandas__libs_properties, sizeof(__pyx_k_pandas__libs_properties), 0, 0, 1, 1},
  {&__pyx_n_s_pandas__libs_tslibs_ccalendar, __pyx_k_pandas__libs_tslibs_ccalendar, sizeof(__pyx_k_pandas__libs_tslibs_ccalendar), 0, 0, 1, 1},
  {&__pyx_n_s_pandas__libs_tslibs_offsets, __pyx_k_pandas__libs_tslibs_offsets, sizeof(__pyx_k_pandas__libs_tslibs_offsets), 0, 0, 1, 1},
  {&__pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_k_pandas__libs_tslibs_offsets_pyx, sizeof(__pyx_k_pandas__libs_tslibs_offsets_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_pandas_util__exceptions, __pyx_k_pandas_util__exceptions, sizeof(__pyx_k_pandas_util__exceptions), 0, 0, 1, 1},
  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {&__pyx_n_s_parse_suffix, __pyx_k_parse_suffix, sizeof(__pyx_k_parse_suffix), 0, 0, 1, 1},
  {&__pyx_kp_u_pass_as_a_string_instead, __pyx_k_pass_as_a_string_instead, sizeof(__pyx_k_pass_as_a_string_instead), 0, 1, 0, 0},
  {&__pyx_n_s_period_dtype_code, __pyx_k_period_dtype_code, sizeof(__pyx_k_period_dtype_code), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
  {&__pyx_n_s_prefix_mapping, __pyx_k_prefix_mapping, sizeof(__pyx_k_prefix_mapping), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_prev_opening_time, __pyx_k_prev_opening_time, sizeof(__pyx_k_prev_opening_time), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BaseOffset, __pyx_k_pyx_unpickle_BaseOffset, sizeof(__pyx_k_pyx_unpickle_BaseOffset), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_RelativeDeltaOffs, __pyx_k_pyx_unpickle_RelativeDeltaOffs, sizeof(__pyx_k_pyx_unpickle_RelativeDeltaOffs), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qtr_with_extra_week, __pyx_k_qtr_with_extra_week, sizeof(__pyx_k_qtr_with_extra_week), 0, 0, 1, 1},
  {&__pyx_n_u_qtr_with_extra_week, __pyx_k_qtr_with_extra_week, sizeof(__pyx_k_qtr_with_extra_week), 0, 1, 0, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce___locals_genexpr, __pyx_k_reduce___locals_genexpr, sizeof(__pyx_k_reduce___locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_relativedelta, __pyx_k_relativedelta, sizeof(__pyx_k_relativedelta), 0, 0, 1, 1},
  {&__pyx_n_s_relativedelta_kwds, __pyx_k_relativedelta_kwds, sizeof(__pyx_k_relativedelta_kwds), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_repr_attrs, __pyx_k_repr_attrs, sizeof(__pyx_k_repr_attrs), 0, 0, 1, 1},
  {&__pyx_n_s_repr_attrs_locals_genexpr, __pyx_k_repr_attrs_locals_genexpr, sizeof(__pyx_k_repr_attrs_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_kp_u_requires_a_suffix, __pyx_k_requires_a_suffix, sizeof(__pyx_k_requires_a_suffix), 0, 1, 0, 0},
  {&__pyx_n_s_res_val, __pyx_k_res_val, sizeof(__pyx_k_res_val), 0, 0, 1, 1},
  {&__pyx_n_s_reso, __pyx_k_reso, sizeof(__pyx_k_reso), 0, 0, 1, 1},
  {&__pyx_n_s_reso_2, __pyx_k_reso_2, sizeof(__pyx_k_reso_2), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  {&__pyx_n_s_roll, __pyx_k_roll, sizeof(__pyx_k_roll), 0, 0, 1, 1},
  {&__pyx_n_s_roll_qtrday, __pyx_k_roll_qtrday, sizeof(__pyx_k_roll_qtrday), 0, 0, 1, 1},
  {&__pyx_n_s_rollback, __pyx_k_rollback, sizeof(__pyx_k_rollback), 0, 0, 1, 1},
  {&__pyx_n_s_rollback_to_year, __pyx_k_rollback_to_year, sizeof(__pyx_k_rollback_to_year), 0, 0, 1, 1},
  {&__pyx_n_s_rollforward, __pyx_k_rollforward, sizeof(__pyx_k_rollforward), 0, 0, 1, 1},
  {&__pyx_n_s_rtruediv, __pyx_k_rtruediv, sizeof(__pyx_k_rtruediv), 0, 0, 1, 1},
  {&__pyx_n_s_rule_code, __pyx_k_rule_code, sizeof(__pyx_k_rule_code), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 1},
  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
  {&__pyx_n_u_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 1, 0, 1},
  {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
  {&__pyx_n_u_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 1, 0, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_kp_u_separator_must_be_spaces, __pyx_k_separator_must_be_spaces, sizeof(__pyx_k_separator_must_be_spaces), 0, 1, 0, 0},
  {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shift_month, __pyx_k_shift_month, sizeof(__pyx_k_shift_month), 0, 0, 1, 1},
  {&__pyx_n_s_shift_months, __pyx_k_shift_months, sizeof(__pyx_k_shift_months), 0, 0, 1, 1},
  {&__pyx_n_s_sign, __pyx_k_sign, sizeof(__pyx_k_sign), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_stacklevel, __pyx_k_stacklevel, sizeof(__pyx_k_stacklevel), 0, 0, 1, 1},
  {&__pyx_n_s_stamp, __pyx_k_stamp, sizeof(__pyx_k_stamp), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_u_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 1, 0, 1},
  {&__pyx_n_s_startingMonth, __pyx_k_startingMonth, sizeof(__pyx_k_startingMonth), 0, 0, 1, 1},
  {&__pyx_n_u_startingMonth, __pyx_k_startingMonth, sizeof(__pyx_k_startingMonth), 0, 1, 0, 1},
  {&__pyx_n_s_startingMonth_code, __pyx_k_startingMonth_code, sizeof(__pyx_k_startingMonth_code), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_strptime, __pyx_k_strptime, sizeof(__pyx_k_strptime), 0, 0, 1, 1},
  {&__pyx_n_s_subclasscheck, __pyx_k_subclasscheck, sizeof(__pyx_k_subclasscheck), 0, 0, 1, 1},
  {&__pyx_n_s_suffix, __pyx_k_suffix, sizeof(__pyx_k_suffix), 0, 0, 1, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_td, __pyx_k_td, sizeof(__pyx_k_td), 0, 0, 1, 1},
  {&__pyx_n_s_td64_unit, __pyx_k_td64_unit, sizeof(__pyx_k_td64_unit), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_u_the_add_operation_between, __pyx_k_the_add_operation_between, sizeof(__pyx_k_the_add_operation_between), 0, 1, 0, 0},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_kp_u_time_data_must_be_specified_only, __pyx_k_time_data_must_be_specified_only, sizeof(__pyx_k_time_data_must_be_specified_only), 0, 1, 0, 0},
  {&__pyx_kp_u_time_data_must_be_string_or_date, __pyx_k_time_data_must_be_string_or_date, sizeof(__pyx_k_time_data_must_be_string_or_date), 0, 1, 0, 0},
  {&__pyx_kp_u_time_data_must_match_H_M_format, __pyx_k_time_data_must_match_H_M_format, sizeof(__pyx_k_time_data_must_match_H_M_format), 0, 1, 0, 0},
  {&__pyx_n_s_timedelta64, __pyx_k_timedelta64, sizeof(__pyx_k_timedelta64), 0, 0, 1, 1},
  {&__pyx_n_s_timedeltas, __pyx_k_timedeltas, sizeof(__pyx_k_timedeltas), 0, 0, 1, 1},
  {&__pyx_n_s_timestamps, __pyx_k_timestamps, sizeof(__pyx_k_timestamps), 0, 0, 1, 1},
  {&__pyx_n_s_tm_hour, __pyx_k_tm_hour, sizeof(__pyx_k_tm_hour), 0, 0, 1, 1},
  {&__pyx_n_s_tm_min, __pyx_k_tm_min, sizeof(__pyx_k_tm_min), 0, 0, 1, 1},
  {&__pyx_kp_u_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 1, 0, 0},
  {&__pyx_kp_u_to_offset_does_not_support_tuple, __pyx_k_to_offset_does_not_support_tuple, sizeof(__pyx_k_to_offset_does_not_support_tuple), 0, 1, 0, 0},
  {&__pyx_kp_u_to_offset_line_3889, __pyx_k_to_offset_line_3889, sizeof(__pyx_k_to_offset_line_3889), 0, 1, 0, 0},
  {&__pyx_n_s_to_pydatetime, __pyx_k_to_pydatetime, sizeof(__pyx_k_to_pydatetime), 0, 0, 1, 1},
  {&__pyx_n_s_to_pytimedelta, __pyx_k_to_pytimedelta, sizeof(__pyx_k_to_pytimedelta), 0, 0, 1, 1},
  {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
  {&__pyx_n_s_total_seconds, __pyx_k_total_seconds, sizeof(__pyx_k_total_seconds), 0, 0, 1, 1},
  {&__pyx_n_s_truediv, __pyx_k_truediv, sizeof(__pyx_k_truediv), 0, 0, 1, 1},
  {&__pyx_n_s_tz, __pyx_k_tz, sizeof(__pyx_k_tz), 0, 0, 1, 1},
  {&__pyx_n_s_tz_localize, __pyx_k_tz_localize, sizeof(__pyx_k_tz_localize), 0, 0, 1, 1},
  {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
  {&__pyx_n_u_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 1, 0, 1},
  {&__pyx_n_u_undefined, __pyx_k_undefined, sizeof(__pyx_k_undefined), 0, 1, 0, 1},
  {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
  {&__pyx_n_u_us, __pyx_k_us, sizeof(__pyx_k_us), 0, 1, 0, 1},
  {&__pyx_n_s_use_relativedelta, __pyx_k_use_relativedelta, sizeof(__pyx_k_use_relativedelta), 0, 0, 1, 1},
  {&__pyx_n_u_use_relativedelta, __pyx_k_use_relativedelta, sizeof(__pyx_k_use_relativedelta), 0, 1, 0, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_validate_n, __pyx_k_validate_n, sizeof(__pyx_k_validate_n), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_variation, __pyx_k_variation, sizeof(__pyx_k_variation), 0, 0, 1, 1},
  {&__pyx_n_u_variation, __pyx_k_variation, sizeof(__pyx_k_variation), 0, 1, 0, 1},
  {&__pyx_n_s_varion_code, __pyx_k_varion_code, sizeof(__pyx_k_varion_code), 0, 0, 1, 1},
  {&__pyx_n_s_vectorized, __pyx_k_vectorized, sizeof(__pyx_k_vectorized), 0, 0, 1, 1},
  {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_week, __pyx_k_week, sizeof(__pyx_k_week), 0, 0, 1, 1},
  {&__pyx_n_u_week, __pyx_k_week, sizeof(__pyx_k_week), 0, 1, 0, 1},
  {&__pyx_n_s_weekday, __pyx_k_weekday, sizeof(__pyx_k_weekday), 0, 0, 1, 1},
  {&__pyx_n_u_weekday, __pyx_k_weekday, sizeof(__pyx_k_weekday), 0, 1, 0, 1},
  {&__pyx_n_s_weekday_code, __pyx_k_weekday_code, sizeof(__pyx_k_weekday_code), 0, 0, 1, 1},
  {&__pyx_n_s_weekday_to_int, __pyx_k_weekday_to_int, sizeof(__pyx_k_weekday_to_int), 0, 0, 1, 1},
  {&__pyx_n_s_weekmask, __pyx_k_weekmask, sizeof(__pyx_k_weekmask), 0, 0, 1, 1},
  {&__pyx_n_u_weekmask, __pyx_k_weekmask, sizeof(__pyx_k_weekmask), 0, 1, 0, 1},
  {&__pyx_n_s_weeks, __pyx_k_weeks, sizeof(__pyx_k_weeks), 0, 0, 1, 1},
  {&__pyx_n_u_weeks, __pyx_k_weeks, sizeof(__pyx_k_weeks), 0, 1, 0, 1},
  {&__pyx_kp_u_will_overflow, __pyx_k_will_overflow, sizeof(__pyx_k_will_overflow), 0, 1, 0, 0},
  {&__pyx_n_s_wrapper, __pyx_k_wrapper, sizeof(__pyx_k_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
  {&__pyx_n_u_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 1, 0, 1},
  {&__pyx_n_s_year_has_extra_week, __pyx_k_year_has_extra_week, sizeof(__pyx_k_year_has_extra_week), 0, 0, 1, 1},
  {&__pyx_n_u_years, __pyx_k_years, sizeof(__pyx_k_years), 0, 1, 0, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 343, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 764, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 240, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 279, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 319, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 471, __pyx_L1_error)
  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 477, __pyx_L1_error)
  __pyx_builtin_FutureWarning = __Pyx_GetBuiltinName(__pyx_n_s_FutureWarning); if (!__pyx_builtin_FutureWarning) __PYX_ERR(0, 503, __pyx_L1_error)
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(0, 1104, __pyx_L1_error)
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 1259, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1286, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1766, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1770, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1800, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 1879, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1960, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 3880, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 944, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pandas/_libs/tslibs/offsets.pyx":128
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 *     def wrapper(self, other) -> np.ndarray:             # <<<<<<<<<<<<<<
 *         # other is a DatetimeArray
 *         result = apply_wrapper_core(func, self, other)
 */
  __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_result); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_wrapper, 128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 128, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":143
 *     # not play nicely with cython class methods
 * 
 *     def wrapper(self, other):             # <<<<<<<<<<<<<<
 * 
 *         if other is NaT:
 */
  __pyx_tuple__3 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_tz, __pyx_n_s_nano, __pyx_n_s_result, __pyx_n_s_value); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_wrapper, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 143, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":280
 *             return dt_time(hour=t.tm_hour, minute=t.tm_min)
 *         except ValueError:
 *             raise ValueError("time data must match '%H:%M' format")             # <<<<<<<<<<<<<<
 *     elif isinstance(t_input, dt_time):
 *         if t_input.second != 0 or t_input.microsecond != 0:
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_time_data_must_match_H_M_format); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "pandas/_libs/tslibs/offsets.pyx":283
 *     elif isinstance(t_input, dt_time):
 *         if t_input.second != 0 or t_input.microsecond != 0:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "time data must be specified only with hour and minute")
 *         return t_input
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_time_data_must_be_specified_only); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "pandas/_libs/tslibs/offsets.pyx":287
 *         return t_input
 *     else:
 *         raise ValueError("time data must be string or datetime.time")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_time_data_must_be_string_or_date); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "pandas/_libs/tslibs/offsets.pyx":330
 *             # sub-daily offset - use timedelta (tz-aware)
 *             offset = timedelta(**kwds_no_nanos)
 *     elif any(nano in kwds for nano in ('nanosecond', 'nanoseconds')):             # <<<<<<<<<<<<<<
 *         offset = timedelta(days=0)
 *     else:
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_nanosecond, __pyx_n_u_nanoseconds); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "pandas/_libs/tslibs/offsets.pyx":310
 *     # TODO: Are nanosecond and nanoseconds allowed somewhere?
 * 
 *     _kwds_use_relativedelta = ('years', 'months', 'weeks', 'days',             # <<<<<<<<<<<<<<
 *                                'year', 'month', 'week', 'day', 'weekday',
 *                                'hour', 'minute', 'second', 'microsecond',
 */
  __pyx_tuple__9 = PyTuple_Pack(14, __pyx_n_u_years, __pyx_n_u_months, __pyx_n_u_weeks, __pyx_n_u_days, __pyx_n_u_year, __pyx_n_u_month, __pyx_n_u_week, __pyx_n_u_day, __pyx_n_u_weekday, __pyx_n_u_hour, __pyx_n_u_minute, __pyx_n_u_second, __pyx_n_u_microsecond, __pyx_n_u_millisecond); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "pandas/_libs/tslibs/offsets.pyx":319
 *         if any(k in _kwds_use_relativedelta for k in kwds_no_nanos):
 *             if "millisecond" in kwds_no_nanos:
 *                 raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                     "Using DateOffset to replace `millisecond` component in "
 *                     "datetime object is not supported. Use "
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Using_DateOffset_to_replace_mill); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "pandas/_libs/tslibs/offsets.pyx":484
 *     def __sub__(self, other):
 *         if PyDateTime_Check(other):
 *             raise TypeError('Cannot subtract datetime from offset.')             # <<<<<<<<<<<<<<
 *         elif type(other) == type(self):
 *             return type(self)(self.n - other.n, normalize=self.normalize,
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Cannot_subtract_datetime_from_of); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "pandas/_libs/tslibs/offsets.pyx":500
 * 
 *     def __call__(self, other):
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "DateOffset.__call__ is deprecated and will be removed in a future "
 *             "version.  Use `offset + other` instead.",
 */
  __pyx_tuple__13 = PyTuple_Pack(2, __pyx_kp_u_DateOffset___call___is_deprecate, __pyx_builtin_FutureWarning); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "pandas/_libs/tslibs/offsets.pyx":607
 *     @property
 *     def _prefix(self) -> str:
 *         raise NotImplementedError("Prefix not defined")             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_Prefix_not_defined); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "pandas/_libs/tslibs/offsets.pyx":678
 *             implementation.
 *         """
 *         warnings.warn("'Offset.apply_index(other)' is deprecated. "             # <<<<<<<<<<<<<<
 *                       "Use 'offset + other' instead.", FutureWarning)
 * 
 */
  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_u_Offset_apply_index_other_is_dep, __pyx_builtin_FutureWarning); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "pandas/_libs/tslibs/offsets.pyx":702
 *         dt = Timestamp(dt)
 *         if not self.is_on_offset(dt):
 *             dt = dt - type(self)(1, normalize=self.normalize, **self.kwds)             # <<<<<<<<<<<<<<
 *         return dt
 * 
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "pandas/_libs/tslibs/offsets.pyx":813
 *         state.pop("calendar", None)
 *         if "kwds" in state:
 *             state["kwds"].pop("calendar", None)             # <<<<<<<<<<<<<<
 * 
 *         return state
 */
  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_u_calendar, Py_None); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "pandas/_libs/tslibs/offsets.pyx":822
 * 
 *     def onOffset(self, dt) -> bool:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "onOffset is a deprecated, use is_on_offset instead.",
 *             FutureWarning,
 */
  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_u_onOffset_is_a_deprecated_use_is, __pyx_builtin_FutureWarning); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "pandas/_libs/tslibs/offsets.pyx":830
 * 
 *     def isAnchored(self) -> bool:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "isAnchored is a deprecated, use is_anchored instead.",
 *             FutureWarning,
 */
  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_kp_u_isAnchored_is_a_deprecated_use_i, __pyx_builtin_FutureWarning); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "pandas/_libs/tslibs/offsets.pyx":969
 *         if normalize:
 *             # GH#21427
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Tick offset with `normalize=True` are not allowed."
 *             )
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Tick_offset_with_normalize_True); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pandas/_libs/tslibs/offsets.pyx":988
 *         if type(self) is Micro:
 *             return Nano(self.n * 1000)
 *         raise ValueError("Could not convert to integer offset at any resolution")             # <<<<<<<<<<<<<<
 * 
 *     # --------------------------------------------------------------------
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Could_not_convert_to_integer_off); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "pandas/_libs/tslibs/offsets.pyx":1259
 *             # Older (<0.22.0) versions have offset attribute instead of _offset
 *             if "_offset" in state:  # pragma: no cover
 *                 raise AssertionError("Unexpected key `_offset`")             # <<<<<<<<<<<<<<
 *             state["_offset"] = state.pop("offset")
 *             state["kwds"]["offset"] = state["_offset"]
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Unexpected_key__offset); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "pandas/_libs/tslibs/offsets.pyx":1318
 *         if self._use_relativedelta and set(kwds).issubset(relativedelta_fast):
 * 
 *             months = (kwds.get("years", 0) * 12 + kwds.get("months", 0)) * self.n             # <<<<<<<<<<<<<<
 *             if months:
 *                 shifted = shift_months(dt64other.view("i8"), months, reso=reso)
 */
  __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_u_years, __pyx_int_0); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_u_months, __pyx_int_0); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "pandas/_libs/tslibs/offsets.pyx":1323
 *                 dt64other = shifted.view(dtarr.dtype)
 * 
 *             weeks = kwds.get("weeks", 0) * self.n             # <<<<<<<<<<<<<<
 *             if weeks:
 *                 delta = Timedelta(days=7 * weeks)
 */
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_u_weeks, __pyx_int_0); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "pandas/_libs/tslibs/offsets.pyx":1486
 *     """
 *     def __setattr__(self, name, value):
 *         raise AttributeError("DateOffset objects are immutable.")             # <<<<<<<<<<<<<<
 * 
 * # --------------------------------------------------------------------
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_DateOffset_objects_are_immutable); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "pandas/_libs/tslibs/offsets.pyx":1583
 * 
 *     def _offset_str(self) -> str:
 *         def get_str(td):             # <<<<<<<<<<<<<<
 *             off_str = ""
 *             if td.days > 0:
 */
  __pyx_tuple__35 = PyTuple_Pack(5, __pyx_n_s_td, __pyx_n_s_off_str, __pyx_n_s_s, __pyx_n_s_hrs, __pyx_n_s_mts); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_get_str, 1583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 1583, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1604
 * 
 *         if PyDelta_Check(self.offset):
 *             zero = timedelta(0, 0, 0)             # <<<<<<<<<<<<<<
 *             if self.offset >= zero:
 *                 off_str = "+" + get_str(self.offset)
 */
  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "pandas/_libs/tslibs/offsets.pyx":1714
 *             start = [start]
 *         if not len(start):
 *             raise ValueError("Must include at least 1 start time")             # <<<<<<<<<<<<<<
 * 
 *         if np.ndim(end) == 0:
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Must_include_at_least_1_start_ti); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "pandas/_libs/tslibs/offsets.pyx":1720
 *             end = [end]
 *         if not len(end):
 *             raise ValueError("Must include at least 1 end time")             # <<<<<<<<<<<<<<
 * 
 *         start = np.array([_validate_business_time(x) for x in start])
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Must_include_at_least_1_end_time); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "pandas/_libs/tslibs/offsets.pyx":1727
 *         # Validation of input
 *         if len(start) != len(end):
 *             raise ValueError("number of starting time and ending time must be the same")             # <<<<<<<<<<<<<<
 *         num_openings = len(start)
 * 
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_number_of_starting_time_and_endi); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "pandas/_libs/tslibs/offsets.pyx":1744
 *             )
 *         if total_secs != 24 * 60 * 60:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "invalid starting and ending time(s): "
 *                 "opening hours should not touch or overlap with "
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_invalid_starting_and_ending_time); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "pandas/_libs/tslibs/offsets.pyx":1762
 * 
 *         state.pop("kwds", {})
 *         state.pop("next_bday", None)             # <<<<<<<<<<<<<<
 *         BusinessMixin.__setstate__(self, state)
 * 
 */
  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_u_next_bday, Py_None); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "pandas/_libs/tslibs/offsets.pyx":1993
 * 
 *         if n >= 0:
 *             while bhour_remain != timedelta(0):             # <<<<<<<<<<<<<<
 *                 # business hour left in this business time interval
 *                 bhour = (
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "pandas/_libs/tslibs/offsets.pyx":2126
 * 
 *         if month < 1 or month > 12:
 *             raise ValueError("Month must go from 1 to 12")             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Month_must_go_from_1_to_12); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "pandas/_libs/tslibs/offsets.pyx":2466
 * 
 *     cpdef __setstate__(self, state):
 *         state.pop("_use_relativedelta", False)             # <<<<<<<<<<<<<<
 *         state.pop("offset", None)
 *         state.pop("_offset", None)
 */
  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_u_use_relativedelta, Py_False); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 2466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "pandas/_libs/tslibs/offsets.pyx":2467
 *     cpdef __setstate__(self, state):
 *         state.pop("_use_relativedelta", False)
 *         state.pop("offset", None)             # <<<<<<<<<<<<<<
 *         state.pop("_offset", None)
 *         state.pop("kwds", {})
 */
  __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_u_offset_2, Py_None); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "pandas/_libs/tslibs/offsets.pyx":2468
 *         state.pop("_use_relativedelta", False)
 *         state.pop("offset", None)
 *         state.pop("_offset", None)             # <<<<<<<<<<<<<<
 *         state.pop("kwds", {})
 * 
 */
  __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_u_offset, Py_None); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 2468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "pandas/_libs/tslibs/offsets.pyx":2949
 *         # only one digit weeks (1 --> week 0, 2 --> week 1, etc.)
 *         week = int(suffix[0]) - 1
 *         weekday = weekday_to_int[suffix[1:]]             # <<<<<<<<<<<<<<
 *         return cls(week=week, weekday=weekday)
 * 
 */
  __pyx_slice__53 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__53)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);

  /* "pandas/_libs/tslibs/offsets.pyx":2988
 * 
 *         if self.n == 0:
 *             raise ValueError("N cannot be 0")             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_N_cannot_be_0); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "pandas/_libs/tslibs/offsets.pyx":3182
 *                 norm.year == prev_year.year
 *                 and norm < prev_year
 *                 and prev_year - norm <= timedelta(6)             # <<<<<<<<<<<<<<
 *             ):
 *                 # GH#14774, error when next_year.year == cur_year.year
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 3182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "pandas/_libs/tslibs/offsets.pyx":3952
 *             if split[-1] != "" and not split[-1].isspace():
 *                 # the last element must be blank
 *                 raise ValueError("last element must be blank")             # <<<<<<<<<<<<<<
 * 
 *             tups = zip(split[0::4], split[1::4], split[2::4])
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_last_element_must_be_blank); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 3952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "pandas/_libs/tslibs/offsets.pyx":3954
 *                 raise ValueError("last element must be blank")
 * 
 *             tups = zip(split[0::4], split[1::4], split[2::4])             # <<<<<<<<<<<<<<
 *             for n, (sep, stride, name) in enumerate(tups):
 *                 if sep != "" and not sep.isspace():
 */
  __pyx_slice__60 = PySlice_New(__pyx_int_0, Py_None, __pyx_int_4); if (unlikely(!__pyx_slice__60)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__60);
  __Pyx_GIVEREF(__pyx_slice__60);
  __pyx_slice__61 = PySlice_New(__pyx_int_1, Py_None, __pyx_int_4); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__61);
  __Pyx_GIVEREF(__pyx_slice__61);
  __pyx_slice__62 = PySlice_New(__pyx_int_2, Py_None, __pyx_int_4); if (unlikely(!__pyx_slice__62)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__62);
  __Pyx_GIVEREF(__pyx_slice__62);

  /* "pandas/_libs/tslibs/offsets.pyx":3957
 *             for n, (sep, stride, name) in enumerate(tups):
 *                 if sep != "" and not sep.isspace():
 *                     raise ValueError("separator must be spaces")             # <<<<<<<<<<<<<<
 *                 prefix = _lite_rule_alias.get(name) or name
 *                 if stride_sign is None:
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_separator_must_be_spaces); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "pandas/_libs/tslibs/offsets.pyx":4068
 *     """
 *     if day_opt not in ["start", "end", "business_start", "business_end"]:
 *         raise ValueError("day must be None, 'start', 'end', "             # <<<<<<<<<<<<<<
 *                          "'business_start', or 'business_end'")
 * 
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_day_must_be_None_start_end_busin); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 4068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0a5792c, 0xa31c5ed, 0xcbadb40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0a5792c, 0xa31c5ed, 0xcbadb40) = (_cache, n, normalize))" % __pyx_checksum)
 */
  __pyx_tuple__68 = PyTuple_Pack(3, __pyx_int_10844460, __pyx_int_171034093, __pyx_int_213572416); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":944
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(3, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "../recipe-sysroot-native/usr/lib/python3.10/site-packages/numpy/__init__.pxd":950
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(3, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "pandas/_libs/tslibs/offsets.pyx":112
 * 
 * 
 * def apply_wrapper_core(func, self, other) -> ndarray:             # <<<<<<<<<<<<<<
 *     result = func(self, other)
 *     result = np.asarray(result)
 */
  __pyx_tuple__71 = PyTuple_Pack(6, __pyx_n_s_func, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_result, __pyx_n_s_normalize_i8_timestamps, __pyx_n_s_reso); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_apply_wrapper_core, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 112, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":125
 * 
 * 
 * def apply_array_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */
  __pyx_tuple__73 = PyTuple_Pack(3, __pyx_n_s_func, __pyx_n_s_wrapper, __pyx_n_s_wrapper); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_apply_array_wraps, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":139
 * 
 * 
 * def apply_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */
  __pyx_tuple__75 = PyTuple_Pack(3, __pyx_n_s_func, __pyx_n_s_wrapper, __pyx_n_s_wrapper); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_apply_wraps, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 139, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":343
 * 
 * 
 * class ApplyTypeError(TypeError):             # <<<<<<<<<<<<<<
 *     # sentinel class for catching the apply error to return NotImplemented
 *     pass
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_builtin_TypeError); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "pandas/_libs/tslibs/offsets.pyx":362
 *     _use_relativedelta = False
 *     _adjust_dst = True
 *     _deprecations = frozenset(["isAnchored", "onOffset"])             # <<<<<<<<<<<<<<
 * 
 *     # cdef readonly:
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_n_u_isAnchored, __pyx_n_u_onOffset); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "pandas/_libs/tslibs/offsets.pyx":765
 *     #  once BaseOffset is a cdef class and is inherited by Tick
 *     @staticmethod
 *     def _validate_n(n) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Require that `n` be an integer.
 */
  __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_nint); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_validate_n, 765, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 765, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1198
 * 
 * 
 * def delta_to_tick(delta: timedelta) -> Tick:             # <<<<<<<<<<<<<<
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:
 *         # nanoseconds only for pd.Timedelta
 */
  __pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_s_delta, __pyx_n_s_seconds, __pyx_n_s_nanos); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_delta_to_tick, 1198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1198, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1371
 * 
 *     @classmethod
 *     def __instancecheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return isinstance(obj, BaseOffset)
 * 
 */
  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_instancecheck, 1371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1371, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1375
 * 
 *     @classmethod
 *     def __subclasscheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return issubclass(obj, BaseOffset)
 * 
 */
  __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_subclasscheck, 1375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1375, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":1485
 *     Timestamp('2017-01-01 08:10:11')
 *     """
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         raise AttributeError("DateOffset objects are immutable.")
 * 
 */
  __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_value); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_setattr, 1485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1485, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3824
 * 
 * # hack to handle WOM-1MON
 * opattern = re.compile(             # <<<<<<<<<<<<<<
 *     r"([+\-]?\d*|[+\-]?\d*\.\d*)\s*([A-Za-z]+([\-][\dA-Za-z\-]+)?)"
 * )
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_d_d_d_s_A_Za_z_dA_Za_z); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "pandas/_libs/tslibs/offsets.pyx":3858
 * 
 * # TODO: better name?
 * def _get_offset(name: str) -> BaseOffset:             # <<<<<<<<<<<<<<
 *     """
 *     Return DateOffset object associated with rule name.
 */
  __pyx_tuple__90 = PyTuple_Pack(5, __pyx_n_s_name_2, __pyx_n_s_split, __pyx_n_s_klass, __pyx_n_s_offset_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 3858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_get_offset, 3858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 3858, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":4110
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def shift_months(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,  # int64_t, arbitrary ndim
 *     int months,
 */
  __pyx_tuple__92 = PyTuple_Pack(12, __pyx_n_s_dtindex, __pyx_n_s_months, __pyx_n_s_day_opt_2, __pyx_n_s_reso, __pyx_n_s_i, __pyx_n_s_dts, __pyx_n_s_count, __pyx_n_s_out, __pyx_n_s_months_to_roll, __pyx_n_s_val, __pyx_n_s_res_val, __pyx_n_s_mi); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_shift_months, 4110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 4110, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":4262
 * 
 * 
 * def shift_month(stamp: datetime, months: int, day_opt: object = None) -> datetime:             # <<<<<<<<<<<<<<
 *     """
 *     Given a datetime (or Timestamp) `stamp`, an integer `months` and an
 */
  __pyx_tuple__94 = PyTuple_Pack(8, __pyx_n_s_stamp, __pyx_n_s_months, __pyx_n_s_day_opt_2, __pyx_n_s_year, __pyx_n_s_month, __pyx_n_s_day, __pyx_n_s_days_in_month, __pyx_n_s_dy); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_shift_month, 4262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 4262, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":4391
 * 
 * 
 * def roll_qtrday(other: datetime, n: int, month: int,             # <<<<<<<<<<<<<<
 *                 day_opt: str, modby: int) -> int:
 *     """
 */
  __pyx_tuple__96 = PyTuple_Pack(7, __pyx_n_s_other, __pyx_n_s_n, __pyx_n_s_month, __pyx_n_s_day_opt_2, __pyx_n_s_modby, __pyx_n_s_months_since, __pyx_n_s_dts); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_tslibs_offsets_pyx, __pyx_n_s_roll_qtrday, 4391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 4391, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseOffset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__98 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseOffset, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__100 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RelativeDeltaOffs, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_52 = PyInt_FromLong(52); if (unlikely(!__pyx_int_52)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_53 = PyInt_FromLong(53); if (unlikely(!__pyx_int_53)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2014 = PyInt_FromLong(2014); if (unlikely(!__pyx_int_2014)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_86400 = PyInt_FromLong(86400L); if (unlikely(!__pyx_int_86400)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000000 = PyInt_FromLong(1000000L); if (unlikely(!__pyx_int_1000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10844460 = PyInt_FromLong(10844460L); if (unlikely(!__pyx_int_10844460)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_171034093 = PyInt_FromLong(171034093L); if (unlikely(!__pyx_int_171034093)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_213572416 = PyInt_FromLong(213572416L); if (unlikely(!__pyx_int_213572416)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000000000 = PyInt_FromLong(1000000000L); if (unlikely(!__pyx_int_1000000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_60000000000 = PyInt_FromString((char *)"60000000000", 0, 0); if (unlikely(!__pyx_int_60000000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3600000000000 = PyInt_FromString((char *)"3600000000000", 0, 0); if (unlikely(!__pyx_int_3600000000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_86400000000000 = PyInt_FromString((char *)"86400000000000", 0, 0); if (unlikely(!__pyx_int_86400000000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("to_offset", (void (*)(void))__pyx_f_6pandas_5_libs_6tslibs_7offsets_to_offset, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_offset_object", (void (*)(void))__pyx_f_6pandas_5_libs_6tslibs_7offsets_is_offset_object, "int (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_tick_object", (void (*)(void))__pyx_f_6pandas_5_libs_6tslibs_7offsets_is_tick_object, "int (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BaseOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingleConstructorOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Tick._next_higher_resolution = (struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Tick *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Tick__next_higher_resolution;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Tick, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Day = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Day;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Day.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Day.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Day) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Day.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Day.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Day.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Day.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Day.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Day) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Day, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Day) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Day;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Hour = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Hour;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Hour.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Hour) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Hour, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Hour;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Minute = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Minute;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Minute.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute) < 0) __PYX_ERR(0, 1158, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Minute) < 0) __PYX_ERR(0, 1158, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Minute, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute) < 0) __PYX_ERR(0, 1158, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Minute;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Second = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Second;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Second.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Second.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Second) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Second.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Second.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Second.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Second.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Second.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Second) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Second, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Second) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Second;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Milli = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Milli;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Milli.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Milli) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Milli, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Milli;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Micro = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Micro;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Micro.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro) < 0) __PYX_ERR(0, 1182, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Micro) < 0) __PYX_ERR(0, 1182, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Micro, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro) < 0) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Micro;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Nano = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Nano;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Nano.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Tick;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Nano) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Nano, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Nano;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset) < 0) __PYX_ERR(0, 1223, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RelativeDeltaOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset) < 0) __PYX_ERR(0, 1223, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset) < 0) __PYX_ERR(0, 1223, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMixin._init_custom = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin__init_custom;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_13BusinessMixin___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin) < 0) __PYX_ERR(0, 1491, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin) < 0) __PYX_ERR(0, 1491, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BusinessMixin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin) < 0) __PYX_ERR(0, 1491, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessDay = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessDay;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessDay.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessDay.__pyx_base.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_11BusinessDay___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay) < 0) __PYX_ERR(0, 1559, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessDay) < 0) __PYX_ERR(0, 1559, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BusinessDay, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay) < 0) __PYX_ERR(0, 1559, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessDay;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessHour = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessHour;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessHour.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessHour.__pyx_base.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_12BusinessHour___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessHour) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BusinessHour, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessHour;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin) < 0) __PYX_ERR(0, 2064, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WeekOfMonthMixin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin) < 0) __PYX_ERR(0, 2064, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearOffset.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_YearOffset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_10YearOffset___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_YearOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BYearEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BYearEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd) < 0) __PYX_ERR(0, 2174, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearEnd) < 0) __PYX_ERR(0, 2174, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BYearEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd) < 0) __PYX_ERR(0, 2174, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BYearBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BYearBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin) < 0) __PYX_ERR(0, 2200, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BYearBegin) < 0) __PYX_ERR(0, 2200, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BYearBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin) < 0) __PYX_ERR(0, 2200, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BYearBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd) < 0) __PYX_ERR(0, 2224, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearEnd) < 0) __PYX_ERR(0, 2224, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_YearEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd) < 0) __PYX_ERR(0, 2224, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_YearBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin) < 0) __PYX_ERR(0, 2249, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_YearBegin) < 0) __PYX_ERR(0, 2249, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_YearBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin) < 0) __PYX_ERR(0, 2249, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_YearBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_QuarterOffset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_13QuarterOffset___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset) < 0) __PYX_ERR(0, 2268, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset) < 0) __PYX_ERR(0, 2268, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QuarterOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset) < 0) __PYX_ERR(0, 2268, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BQuarterEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin) < 0) __PYX_ERR(0, 2368, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin) < 0) __PYX_ERR(0, 2368, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BQuarterBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin) < 0) __PYX_ERR(0, 2368, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd) < 0) __PYX_ERR(0, 2396, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterEnd) < 0) __PYX_ERR(0, 2396, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QuarterEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd) < 0) __PYX_ERR(0, 2396, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin) < 0) __PYX_ERR(0, 2424, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_QuarterBegin) < 0) __PYX_ERR(0, 2424, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QuarterBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin) < 0) __PYX_ERR(0, 2424, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_QuarterBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthOffset.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_MonthOffset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_11MonthOffset___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset) < 0) __PYX_ERR(0, 2447, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset) < 0) __PYX_ERR(0, 2447, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MonthOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset) < 0) __PYX_ERR(0, 2447, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd) < 0) __PYX_ERR(0, 2474, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthEnd) < 0) __PYX_ERR(0, 2474, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MonthEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd) < 0) __PYX_ERR(0, 2474, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_MonthBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin) < 0) __PYX_ERR(0, 2489, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthBegin) < 0) __PYX_ERR(0, 2489, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MonthBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin) < 0) __PYX_ERR(0, 2489, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_MonthBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd) < 0) __PYX_ERR(0, 2503, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd) < 0) __PYX_ERR(0, 2503, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BusinessMonthEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd) < 0) __PYX_ERR(0, 2503, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BusinessMonthBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_15SemiMonthOffset___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset) < 0) __PYX_ERR(0, 2544, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset) < 0) __PYX_ERR(0, 2544, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SemiMonthOffset, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset) < 0) __PYX_ERR(0, 2544, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd) < 0) __PYX_ERR(0, 2675, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd) < 0) __PYX_ERR(0, 2675, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SemiMonthEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd) < 0) __PYX_ERR(0, 2675, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin) < 0) __PYX_ERR(0, 2702, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin) < 0) __PYX_ERR(0, 2702, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SemiMonthBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin) < 0) __PYX_ERR(0, 2702, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Week = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Week;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Week.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week___setstate__;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Week._end_apply_index = (PyArrayObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Week *, PyArrayObject *, NPY_DATETIMEUNIT))__pyx_f_6pandas_5_libs_6tslibs_7offsets_4Week__end_apply_index;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Week.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Week) < 0) __PYX_ERR(0, 2731, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Week.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Week.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Week.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Week.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Week.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Week) < 0) __PYX_ERR(0, 2731, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Week, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Week) < 0) __PYX_ERR(0, 2731, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Week;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_11WeekOfMonth___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth) < 0) __PYX_ERR(0, 2881, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth) < 0) __PYX_ERR(0, 2881, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WeekOfMonth, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth) < 0) __PYX_ERR(0, 2881, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_15LastWeekOfMonth___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth) < 0) __PYX_ERR(0, 2953, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth) < 0) __PYX_ERR(0, 2953, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LastWeekOfMonth, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth) < 0) __PYX_ERR(0, 2953, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_11FY5253Mixin___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin) < 0) __PYX_ERR(0, 3026, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin) < 0) __PYX_ERR(0, 3026, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FY5253Mixin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin) < 0) __PYX_ERR(0, 3026, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253 = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253) < 0) __PYX_ERR(0, 3079, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253) < 0) __PYX_ERR(0, 3079, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FY5253, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253) < 0) __PYX_ERR(0, 3079, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253 = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.__pyx_base.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_13FY5253Quarter___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Mixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FY5253Quarter, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Easter = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Easter;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_Easter.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_Easter *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_6Easter___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter) < 0) __PYX_ERR(0, 3484, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_Easter) < 0) __PYX_ERR(0, 3484, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Easter, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter) < 0) __PYX_ERR(0, 3484, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Easter = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_Easter;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessDay;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.__pyx_base.__pyx_base.__pyx___setstate__ = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6tslibs_7offsets_BusinessMixin *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6tslibs_7offsets_17CustomBusinessDay___setstate__;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay) < 0) __PYX_ERR(0, 3540, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay) < 0) __PYX_ERR(0, 3540, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CustomBusinessDay, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay) < 0) __PYX_ERR(0, 3540, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessHour;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CustomBusinessHour, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMixin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth) < 0) __PYX_ERR(0, 3671, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth) < 0) __PYX_ERR(0, 3671, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CustomBusinessMonth, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth) < 0) __PYX_ERR(0, 3671, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth = &__pyx_type_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd) < 0) __PYX_ERR(0, 3768, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd) < 0) __PYX_ERR(0, 3768, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CustomBusinessMonthEnd, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd) < 0) __PYX_ERR(0, 3768, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd;
  __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin = &__pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin;
  __pyx_vtable_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.tp_base = __pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin) < 0) __PYX_ERR(0, 3772, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin.tp_dict, __pyx_vtabptr_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin) < 0) __PYX_ERR(0, 3772, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CustomBusinessMonthBegin, (PyObject *)&__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin) < 0) __PYX_ERR(0, 3772, __pyx_L1_error)
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin = &__pyx_type_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct__apply_array_wraps;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_1_apply_wraps;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_2___pyx_f_6pandas_5_libs_6tslibs_7offsets__determine_offset;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_3_genexpr;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_4_genexpr;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_5_genexpr;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__ = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_6___reduce__;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_7_genexpr;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs) < 0) __PYX_ERR(0, 1765, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_8__repr_attrs;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr) < 0) __PYX_ERR(0, 1769, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_9_genexpr;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply) < 0) __PYX_ERR(0, 1931, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_10__apply;
  if (PyType_Ready(&__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 1961, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr.tp_dictoffset && __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr = &__pyx_type_6pandas_5_libs_6tslibs_7offsets___pyx_scope_struct_11_genexpr;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(6, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 199, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 222, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 226, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 238, __pyx_L1_error)
  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_generic) __PYX_ERR(3, 770, __pyx_L1_error)
  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_number) __PYX_ERR(3, 772, __pyx_L1_error)
  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_integer) __PYX_ERR(3, 774, __pyx_L1_error)
  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(3, 776, __pyx_L1_error)
  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(3, 778, __pyx_L1_error)
  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(3, 780, __pyx_L1_error)
  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_floating) __PYX_ERR(3, 782, __pyx_L1_error)
  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(3, 784, __pyx_L1_error)
  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(3, 786, __pyx_L1_error)
  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_character) __PYX_ERR(3, 788, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType(__pyx_t_1, "datetime", "date", sizeof(PyDateTime_Date), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(4, 9, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType(__pyx_t_1, "datetime", "time", sizeof(PyDateTime_Time), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(4, 12, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType(__pyx_t_1, "datetime", "datetime", sizeof(PyDateTime_DateTime), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(4, 15, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType(__pyx_t_1, "datetime", "timedelta", sizeof(PyDateTime_Delta), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(4, 18, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType(__pyx_t_1, "datetime", "tzinfo", sizeof(PyDateTime_TZInfo), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(4, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.conversion"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pandas_5_libs_6tslibs_10conversion__TSObject = __Pyx_ImportType(__pyx_t_1, "pandas._libs.tslibs.conversion", "_TSObject", sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_10conversion__TSObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pandas_5_libs_6tslibs_10conversion__TSObject) __PYX_ERR(7, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.dtypes"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase = __Pyx_ImportType(__pyx_t_1, "pandas._libs.tslibs.dtypes", "PeriodDtypeBase", sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase) __PYX_ERR(8, 99, __pyx_L1_error)
  __pyx_vtabptr_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase*)__Pyx_GetVtable(__pyx_ptype_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeBase)) __PYX_ERR(8, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.nattype"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pandas_5_libs_6tslibs_7nattype__NaT = __Pyx_ImportType(__pyx_t_1, "pandas._libs.tslibs.nattype", "_NaT", sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_7nattype__NaT), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pandas_5_libs_6tslibs_7nattype__NaT) __PYX_ERR(9, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.timedeltas"); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pandas_5_libs_6tslibs_10timedeltas__Timedelta = __Pyx_ImportType(__pyx_t_1, "pandas._libs.tslibs.timedeltas", "_Timedelta", sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_10timedeltas__Timedelta), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pandas_5_libs_6tslibs_10timedeltas__Timedelta) __PYX_ERR(10, 16, __pyx_L1_error)
  __pyx_vtabptr_6pandas_5_libs_6tslibs_10timedeltas__Timedelta = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timedeltas__Timedelta*)__Pyx_GetVtable(__pyx_ptype_6pandas_5_libs_6tslibs_10timedeltas__Timedelta->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_5_libs_6tslibs_10timedeltas__Timedelta)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.base"); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pandas_5_libs_6tslibs_4base_ABCTimestamp = __Pyx_ImportType(__pyx_t_1, "pandas._libs.tslibs.base", "ABCTimestamp", sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_4base_ABCTimestamp), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pandas_5_libs_6tslibs_4base_ABCTimestamp) __PYX_ERR(11, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.timestamps"); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp = __Pyx_ImportType(__pyx_t_1, "pandas._libs.tslibs.timestamps", "_Timestamp", sizeof(struct __pyx_obj_6pandas_5_libs_6tslibs_10timestamps__Timestamp), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp) __PYX_ERR(12, 23, __pyx_L1_error)
  __pyx_vtabptr_6pandas_5_libs_6tslibs_10timestamps__Timestamp = (struct __pyx_vtabstruct_6pandas_5_libs_6tslibs_10timestamps__Timestamp*)__Pyx_GetVtable(__pyx_ptype_6pandas_5_libs_6tslibs_10timestamps__Timestamp->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_5_libs_6tslibs_10timestamps__Timestamp)) __PYX_ERR(12, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.ccalendar"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "c_MONTH_NUMBERS", (void **)&__pyx_vp_6pandas_5_libs_6tslibs_9ccalendar_c_MONTH_NUMBERS, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "month_offset", (void **)&__pyx_vp_6pandas_5_libs_6tslibs_9ccalendar_month_offset, "__pyx_t_5numpy_int32_t *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.dtypes"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "attrname_to_abbrevs", (void **)&__pyx_vp_6pandas_5_libs_6tslibs_6dtypes_attrname_to_abbrevs, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.nattype"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "NPY_NAT", (void **)&__pyx_vp_6pandas_5_libs_6tslibs_7nattype_NPY_NAT, "__pyx_t_5numpy_int64_t") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "c_nat_strings", (void **)&__pyx_vp_6pandas_5_libs_6tslibs_7nattype_c_nat_strings, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "c_NaT", (void **)&__pyx_vp_6pandas_5_libs_6tslibs_7nattype_c_NaT, "struct __pyx_obj_6pandas_5_libs_6tslibs_7nattype__NaT *") < 0) __PYX_ERR(0, 1, __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_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.ccalendar"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "dayofweek", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_dayofweek, "int (int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_days_in_month", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_days_in_month, "__pyx_t_5numpy_int32_t (int, Py_ssize_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_lastbday", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_lastbday, "int (int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_firstbday", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_9ccalendar_get_firstbday, "int (int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.np_datetime"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "pydate_to_dtstruct", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_11np_datetime_pydate_to_dtstruct, "void (PyDateTime_Date *, npy_datetimestruct *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_unit_from_dtype", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_11np_datetime_get_unit_from_dtype, "NPY_DATETIMEUNIT (PyArray_Descr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.conversion"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "localize_pydatetime", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_10conversion_localize_pydatetime, "PyDateTime_DateTime *(PyDateTime_DateTime *, PyDateTime_TZInfo *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.dtypes"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "periods_per_day", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_6dtypes_periods_per_day, "__pyx_t_5numpy_int64_t (int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5_libs_6tslibs_6dtypes_periods_per_day *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pandas._libs.tslibs.timedeltas"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "delta_to_nanoseconds", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds, "__pyx_t_5numpy_int64_t (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5_libs_6tslibs_10timedeltas_delta_to_nanoseconds *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "is_any_td_scalar", (void (**)(void))&__pyx_f_6pandas_5_libs_6tslibs_10timedeltas_is_any_td_scalar, "int (PyObject *)") < 0) __PYX_ERR(0, 1, __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;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initoffsets(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initoffsets(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_offsets(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_offsets(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
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, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    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_offsets(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  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 'offsets' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_offsets(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("offsets", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pandas___libs__tslibs__offsets) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pandas._libs.tslibs.offsets")) {
      if (unlikely(PyDict_SetItemString(modules, "pandas._libs.tslibs.offsets", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_variable_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "pandas/_libs/tslibs/offsets.pyx":1
 * import operator             # <<<<<<<<<<<<<<
 * import re
 * import time
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":2
 * import operator
 * import re             # <<<<<<<<<<<<<<
 * import time
 * import warnings
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3
 * import operator
 * import re
 * import time             # <<<<<<<<<<<<<<
 * import warnings
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4
 * import re
 * import time
 * import warnings             # <<<<<<<<<<<<<<
 * 
 * from pandas.util._exceptions import find_stack_level
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":6
 * import warnings
 * 
 * from pandas.util._exceptions import find_stack_level             # <<<<<<<<<<<<<<
 * 
 * cimport cython
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_find_stack_level);
  __Pyx_GIVEREF(__pyx_n_s_find_stack_level);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_find_stack_level);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas_util__exceptions, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_find_stack_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_stack_level, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":20
 * )
 * 
 * import_datetime()             # <<<<<<<<<<<<<<
 * 
 * from dateutil.easter import easter
 */
  __pyx_f_7cpython_8datetime_import_datetime();

  /* "pandas/_libs/tslibs/offsets.pyx":22
 * import_datetime()
 * 
 * from dateutil.easter import easter             # <<<<<<<<<<<<<<
 * from dateutil.relativedelta import relativedelta
 * import numpy as np
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_easter);
  __Pyx_GIVEREF(__pyx_n_s_easter);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_easter);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_dateutil_easter, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_easter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_easter, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":23
 * 
 * from dateutil.easter import easter
 * from dateutil.relativedelta import relativedelta             # <<<<<<<<<<<<<<
 * import numpy as np
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_relativedelta);
  __Pyx_GIVEREF(__pyx_n_s_relativedelta);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_relativedelta);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_relativedelta, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_relativedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_relativedelta, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":24
 * from dateutil.easter import easter
 * from dateutil.relativedelta import relativedelta
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * cimport numpy as cnp
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":32
 * )
 * 
 * cnp.import_array()             # <<<<<<<<<<<<<<
 * 
 * # TODO: formalize having _libs.properties "above" tslibs in the dependency structure
 */
  __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 32, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":36
 * # TODO: formalize having _libs.properties "above" tslibs in the dependency structure
 * 
 * from pandas._libs.properties import cache_readonly             # <<<<<<<<<<<<<<
 * 
 * from pandas._libs.tslibs cimport util
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_cache_readonly);
  __Pyx_GIVEREF(__pyx_n_s_cache_readonly);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_cache_readonly);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas__libs_properties, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cache_readonly, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":46
 * 
 * from pandas._libs.tslibs.ccalendar import (
 *     MONTH_ALIASES,             # <<<<<<<<<<<<<<
 *     MONTH_TO_CAL_NUM,
 *     int_to_weekday,
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_MONTH_ALIASES);
  __Pyx_GIVEREF(__pyx_n_s_MONTH_ALIASES);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MONTH_ALIASES);
  __Pyx_INCREF(__pyx_n_s_MONTH_TO_CAL_NUM);
  __Pyx_GIVEREF(__pyx_n_s_MONTH_TO_CAL_NUM);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_MONTH_TO_CAL_NUM);
  __Pyx_INCREF(__pyx_n_s_int_to_weekday);
  __Pyx_GIVEREF(__pyx_n_s_int_to_weekday);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_int_to_weekday);
  __Pyx_INCREF(__pyx_n_s_weekday_to_int);
  __Pyx_GIVEREF(__pyx_n_s_weekday_to_int);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_weekday_to_int);

  /* "pandas/_libs/tslibs/offsets.pyx":45
 * )
 * 
 * from pandas._libs.tslibs.ccalendar import (             # <<<<<<<<<<<<<<
 *     MONTH_ALIASES,
 *     MONTH_TO_CAL_NUM,
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas__libs_tslibs_ccalendar, __pyx_t_1, 0); 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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MONTH_ALIASES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MONTH_ALIASES, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MONTH_TO_CAL_NUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MONTH_TO_CAL_NUM, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_int_to_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_int_to_weekday, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_weekday_to_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_weekday_to_int, __pyx_t_1) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":80
 * )
 * 
 * from .timedeltas import Timedelta             # <<<<<<<<<<<<<<
 * 
 * from .timestamps cimport _Timestamp
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Timedelta);
  __Pyx_GIVEREF(__pyx_n_s_Timedelta);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Timedelta);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_timedeltas, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Timedelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timedelta, __pyx_t_2) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":84
 * from .timestamps cimport _Timestamp
 * 
 * from .timestamps import Timestamp             # <<<<<<<<<<<<<<
 * 
 * # ---------------------------------------------------------------------
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Timestamp);
  __Pyx_GIVEREF(__pyx_n_s_Timestamp);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Timestamp);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_timestamps, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_1) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":112
 * 
 * 
 * def apply_wrapper_core(func, self, other) -> ndarray:             # <<<<<<<<<<<<<<
 *     result = func(self, other)
 *     result = np.asarray(result)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_1apply_wrapper_core, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_apply_wrapper_core, __pyx_t_2) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":125
 * 
 * 
 * def apply_array_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_3apply_array_wraps, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_apply_array_wraps, __pyx_t_2) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":139
 * 
 * 
 * def apply_wraps(func):             # <<<<<<<<<<<<<<
 *     # Note: normally we would use `@functools.wraps(func)`, but this does
 *     # not play nicely with cython class methods
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_5apply_wraps, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_apply_wraps, __pyx_t_2) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":293
 * # Constructor Helpers
 * 
 * _relativedelta_kwds = {"years", "months", "weeks", "days", "year", "month",             # <<<<<<<<<<<<<<
 *                        "day", "weekday", "hour", "minute", "second",
 *                        "microsecond", "millisecond", "nanosecond",
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PySet_Add(__pyx_t_2, __pyx_n_u_years) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_months) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_weeks) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_days) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_year) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_month) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_day) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_weekday) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_hour) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_minute) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_second) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_microsecond) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_millisecond) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_nanosecond) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_nanoseconds) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_hours) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_minutes) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_seconds) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_milliseconds) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_u_microseconds) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_relativedelta_kwds, __pyx_t_2) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":343
 * 
 * 
 * class ApplyTypeError(TypeError):             # <<<<<<<<<<<<<<
 *     # sentinel class for catching the apply error to return NotImplemented
 *     pass
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__77); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__77, __pyx_n_s_ApplyTypeError, __pyx_n_s_ApplyTypeError, (PyObject *) NULL, __pyx_n_s_pandas__libs_tslibs_offsets, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ApplyTypeError, __pyx_tuple__77, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ApplyTypeError, __pyx_t_4) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":356
 *     """
 *     # ensure that reversed-ops with numpy scalars return NotImplemented
 *     __array_priority__ = 1000             # <<<<<<<<<<<<<<
 * 
 *     _day_opt = None
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_array_priority, __pyx_int_1000) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":358
 *     __array_priority__ = 1000
 * 
 *     _day_opt = None             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize"])
 *     _use_relativedelta = False
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_day_opt, Py_None) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":359
 * 
 *     _day_opt = None
 *     _attributes = tuple(["n", "normalize"])             # <<<<<<<<<<<<<<
 *     _use_relativedelta = False
 *     _adjust_dst = True
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_normalize);
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":360
 *     _day_opt = None
 *     _attributes = tuple(["n", "normalize"])
 *     _use_relativedelta = False             # <<<<<<<<<<<<<<
 *     _adjust_dst = True
 *     _deprecations = frozenset(["isAnchored", "onOffset"])
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_use_relativedelta, Py_False) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":361
 *     _attributes = tuple(["n", "normalize"])
 *     _use_relativedelta = False
 *     _adjust_dst = True             # <<<<<<<<<<<<<<
 *     _deprecations = frozenset(["isAnchored", "onOffset"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_adjust_dst, Py_True) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":362
 *     _use_relativedelta = False
 *     _adjust_dst = True
 *     _deprecations = frozenset(["isAnchored", "onOffset"])             # <<<<<<<<<<<<<<
 * 
 *     # cdef readonly:
 */
  __pyx_t_1 = __Pyx_PyFrozenSet_New(__pyx_tuple__78); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_deprecations, __pyx_t_1) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":412
 *         return hash(self._params)
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def _params(self):
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":413
 * 
 *     @cache_readonly
 *     def _params(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple containing all of the attributes needed to evaluate
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset, __pyx_n_s_params); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_params, __pyx_t_1) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":613
 *         return self._prefix
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def freqstr(self) -> str:
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":614
 * 
 *     @cache_readonly
 *     def freqstr(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Return a string representing the frequency.
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset, __pyx_n_s_freqstr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_freqstr, __pyx_t_1) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":684
 *         return type(dtindex)(res)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         raise NotImplementedError(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":685
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(
 *             f"DateOffset subclass {type(self).__name__} "
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_apply_array, __pyx_t_1) < 0) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":765
 *     #  once BaseOffset is a cdef class and is inherited by Tick
 *     @staticmethod
 *     def _validate_n(n) -> int:             # <<<<<<<<<<<<<<
 *         """
 *         Require that `n` be an integer.
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10BaseOffset_51_validate_n, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_validate_n, __pyx_t_1) < 0) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":764
 *     # Staticmethod so we can call from Tick.__init__, will be unnecessary
 *     #  once BaseOffset is a cdef class and is inherited by Tick
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _validate_n(n) -> int:
 *         """
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset, __pyx_n_s_validate_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset->tp_dict, __pyx_n_s_validate_n, __pyx_t_2) < 0) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":935
 * cdef class SingleConstructorOffset(BaseOffset):
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         # default _from_name calls cls with no args
 *         if suffix:
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset, __pyx_n_s_from_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":934
 * 
 * cdef class SingleConstructorOffset(BaseOffset):
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         # default _from_name calls cls with no args
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset->tp_dict, __pyx_n_s_from_name, __pyx_t_1) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SingleConstructorOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":957
 * 
 * cdef class Tick(SingleConstructorOffset):
 *     _adjust_dst = False             # <<<<<<<<<<<<<<
 *     _prefix = "undefined"
 *     _td64_unit = "undefined"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick->tp_dict, __pyx_n_s_adjust_dst, Py_False) < 0) __PYX_ERR(0, 957, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick);

  /* "pandas/_libs/tslibs/offsets.pyx":958
 * cdef class Tick(SingleConstructorOffset):
 *     _adjust_dst = False
 *     _prefix = "undefined"             # <<<<<<<<<<<<<<
 *     _td64_unit = "undefined"
 *     _attributes = tuple(["n", "normalize"])
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick->tp_dict, __pyx_n_s_prefix, __pyx_n_u_undefined) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick);

  /* "pandas/_libs/tslibs/offsets.pyx":959
 *     _adjust_dst = False
 *     _prefix = "undefined"
 *     _td64_unit = "undefined"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_undefined) < 0) __PYX_ERR(0, 959, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick);

  /* "pandas/_libs/tslibs/offsets.pyx":960
 *     _prefix = "undefined"
 *     _td64_unit = "undefined"
 *     _attributes = tuple(["n", "normalize"])             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False):
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick->tp_dict, __pyx_n_s_attributes, __pyx_t_2) < 0) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Tick);

  /* "pandas/_libs/tslibs/offsets.pyx":1143
 * 
 * cdef class Day(Tick):
 *     _nanos_inc = 24 * 3600 * 1_000_000_000             # <<<<<<<<<<<<<<
 *     _prefix = "D"
 *     _td64_unit = "D"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_86400000000000) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day);

  /* "pandas/_libs/tslibs/offsets.pyx":1144
 * cdef class Day(Tick):
 *     _nanos_inc = 24 * 3600 * 1_000_000_000
 *     _prefix = "D"             # <<<<<<<<<<<<<<
 *     _td64_unit = "D"
 *     _period_dtype_code = PeriodDtypeCode.D
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day->tp_dict, __pyx_n_s_prefix, __pyx_n_u_D) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day);

  /* "pandas/_libs/tslibs/offsets.pyx":1145
 *     _nanos_inc = 24 * 3600 * 1_000_000_000
 *     _prefix = "D"
 *     _td64_unit = "D"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.D
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_D
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_D) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day);

  /* "pandas/_libs/tslibs/offsets.pyx":1146
 *     _prefix = "D"
 *     _td64_unit = "D"
 *     _period_dtype_code = PeriodDtypeCode.D             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_D
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day);

  /* "pandas/_libs/tslibs/offsets.pyx":1147
 *     _td64_unit = "D"
 *     _period_dtype_code = PeriodDtypeCode.D
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_D             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day);

  /* "pandas/_libs/tslibs/offsets.pyx":1151
 * 
 * cdef class Hour(Tick):
 *     _nanos_inc = 3600 * 1_000_000_000             # <<<<<<<<<<<<<<
 *     _prefix = "H"
 *     _td64_unit = "h"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_3600000000000) < 0) __PYX_ERR(0, 1151, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour);

  /* "pandas/_libs/tslibs/offsets.pyx":1152
 * cdef class Hour(Tick):
 *     _nanos_inc = 3600 * 1_000_000_000
 *     _prefix = "H"             # <<<<<<<<<<<<<<
 *     _td64_unit = "h"
 *     _period_dtype_code = PeriodDtypeCode.H
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour->tp_dict, __pyx_n_s_prefix, __pyx_n_u_H) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour);

  /* "pandas/_libs/tslibs/offsets.pyx":1153
 *     _nanos_inc = 3600 * 1_000_000_000
 *     _prefix = "H"
 *     _td64_unit = "h"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.H
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_h
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_h) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour);

  /* "pandas/_libs/tslibs/offsets.pyx":1154
 *     _prefix = "H"
 *     _td64_unit = "h"
 *     _period_dtype_code = PeriodDtypeCode.H             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_h
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_H); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour);

  /* "pandas/_libs/tslibs/offsets.pyx":1155
 *     _td64_unit = "h"
 *     _period_dtype_code = PeriodDtypeCode.H
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_h             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour);

  /* "pandas/_libs/tslibs/offsets.pyx":1159
 * 
 * cdef class Minute(Tick):
 *     _nanos_inc = 60 * 1_000_000_000             # <<<<<<<<<<<<<<
 *     _prefix = "T"
 *     _td64_unit = "m"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_60000000000) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute);

  /* "pandas/_libs/tslibs/offsets.pyx":1160
 * cdef class Minute(Tick):
 *     _nanos_inc = 60 * 1_000_000_000
 *     _prefix = "T"             # <<<<<<<<<<<<<<
 *     _td64_unit = "m"
 *     _period_dtype_code = PeriodDtypeCode.T
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute->tp_dict, __pyx_n_s_prefix, __pyx_n_u_T) < 0) __PYX_ERR(0, 1160, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute);

  /* "pandas/_libs/tslibs/offsets.pyx":1161
 *     _nanos_inc = 60 * 1_000_000_000
 *     _prefix = "T"
 *     _td64_unit = "m"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.T
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_m
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_m) < 0) __PYX_ERR(0, 1161, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute);

  /* "pandas/_libs/tslibs/offsets.pyx":1162
 *     _prefix = "T"
 *     _td64_unit = "m"
 *     _period_dtype_code = PeriodDtypeCode.T             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_m
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute);

  /* "pandas/_libs/tslibs/offsets.pyx":1163
 *     _td64_unit = "m"
 *     _period_dtype_code = PeriodDtypeCode.T
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_m             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute);

  /* "pandas/_libs/tslibs/offsets.pyx":1167
 * 
 * cdef class Second(Tick):
 *     _nanos_inc = 1_000_000_000             # <<<<<<<<<<<<<<
 *     _prefix = "S"
 *     _td64_unit = "s"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_1000000000) < 0) __PYX_ERR(0, 1167, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second);

  /* "pandas/_libs/tslibs/offsets.pyx":1168
 * cdef class Second(Tick):
 *     _nanos_inc = 1_000_000_000
 *     _prefix = "S"             # <<<<<<<<<<<<<<
 *     _td64_unit = "s"
 *     _period_dtype_code = PeriodDtypeCode.S
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second->tp_dict, __pyx_n_s_prefix, __pyx_n_u_S) < 0) __PYX_ERR(0, 1168, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second);

  /* "pandas/_libs/tslibs/offsets.pyx":1169
 *     _nanos_inc = 1_000_000_000
 *     _prefix = "S"
 *     _td64_unit = "s"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.S
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_s
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_s) < 0) __PYX_ERR(0, 1169, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second);

  /* "pandas/_libs/tslibs/offsets.pyx":1170
 *     _prefix = "S"
 *     _td64_unit = "s"
 *     _period_dtype_code = PeriodDtypeCode.S             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_s
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second);

  /* "pandas/_libs/tslibs/offsets.pyx":1171
 *     _td64_unit = "s"
 *     _period_dtype_code = PeriodDtypeCode.S
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_s             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second);

  /* "pandas/_libs/tslibs/offsets.pyx":1175
 * 
 * cdef class Milli(Tick):
 *     _nanos_inc = 1_000_000             # <<<<<<<<<<<<<<
 *     _prefix = "L"
 *     _td64_unit = "ms"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_1000000) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli);

  /* "pandas/_libs/tslibs/offsets.pyx":1176
 * cdef class Milli(Tick):
 *     _nanos_inc = 1_000_000
 *     _prefix = "L"             # <<<<<<<<<<<<<<
 *     _td64_unit = "ms"
 *     _period_dtype_code = PeriodDtypeCode.L
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli->tp_dict, __pyx_n_s_prefix, __pyx_n_u_L) < 0) __PYX_ERR(0, 1176, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli);

  /* "pandas/_libs/tslibs/offsets.pyx":1177
 *     _nanos_inc = 1_000_000
 *     _prefix = "L"
 *     _td64_unit = "ms"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.L
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_ms
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_ms) < 0) __PYX_ERR(0, 1177, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli);

  /* "pandas/_libs/tslibs/offsets.pyx":1178
 *     _prefix = "L"
 *     _td64_unit = "ms"
 *     _period_dtype_code = PeriodDtypeCode.L             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_ms
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_L); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli);

  /* "pandas/_libs/tslibs/offsets.pyx":1179
 *     _td64_unit = "ms"
 *     _period_dtype_code = PeriodDtypeCode.L
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_ms             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_ms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli);

  /* "pandas/_libs/tslibs/offsets.pyx":1183
 * 
 * cdef class Micro(Tick):
 *     _nanos_inc = 1000             # <<<<<<<<<<<<<<
 *     _prefix = "U"
 *     _td64_unit = "us"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_1000) < 0) __PYX_ERR(0, 1183, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro);

  /* "pandas/_libs/tslibs/offsets.pyx":1184
 * cdef class Micro(Tick):
 *     _nanos_inc = 1000
 *     _prefix = "U"             # <<<<<<<<<<<<<<
 *     _td64_unit = "us"
 *     _period_dtype_code = PeriodDtypeCode.U
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro->tp_dict, __pyx_n_s_prefix, __pyx_n_u_U) < 0) __PYX_ERR(0, 1184, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro);

  /* "pandas/_libs/tslibs/offsets.pyx":1185
 *     _nanos_inc = 1000
 *     _prefix = "U"
 *     _td64_unit = "us"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.U
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_us
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_us) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro);

  /* "pandas/_libs/tslibs/offsets.pyx":1186
 *     _prefix = "U"
 *     _td64_unit = "us"
 *     _period_dtype_code = PeriodDtypeCode.U             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_us
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_U); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro);

  /* "pandas/_libs/tslibs/offsets.pyx":1187
 *     _td64_unit = "us"
 *     _period_dtype_code = PeriodDtypeCode.U
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_us             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_us); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro);

  /* "pandas/_libs/tslibs/offsets.pyx":1191
 * 
 * cdef class Nano(Tick):
 *     _nanos_inc = 1             # <<<<<<<<<<<<<<
 *     _prefix = "N"
 *     _td64_unit = "ns"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano->tp_dict, __pyx_n_s_nanos_inc, __pyx_int_1) < 0) __PYX_ERR(0, 1191, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano);

  /* "pandas/_libs/tslibs/offsets.pyx":1192
 * cdef class Nano(Tick):
 *     _nanos_inc = 1
 *     _prefix = "N"             # <<<<<<<<<<<<<<
 *     _td64_unit = "ns"
 *     _period_dtype_code = PeriodDtypeCode.N
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano->tp_dict, __pyx_n_s_prefix, __pyx_n_u_N) < 0) __PYX_ERR(0, 1192, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano);

  /* "pandas/_libs/tslibs/offsets.pyx":1193
 *     _nanos_inc = 1
 *     _prefix = "N"
 *     _td64_unit = "ns"             # <<<<<<<<<<<<<<
 *     _period_dtype_code = PeriodDtypeCode.N
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_ns
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano->tp_dict, __pyx_n_s_td64_unit, __pyx_n_u_ns) < 0) __PYX_ERR(0, 1193, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano);

  /* "pandas/_libs/tslibs/offsets.pyx":1194
 *     _prefix = "N"
 *     _td64_unit = "ns"
 *     _period_dtype_code = PeriodDtypeCode.N             # <<<<<<<<<<<<<<
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_ns
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_2) < 0) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano);

  /* "pandas/_libs/tslibs/offsets.pyx":1195
 *     _td64_unit = "ns"
 *     _period_dtype_code = PeriodDtypeCode.N
 *     _reso = NPY_DATETIMEUNIT.NPY_FR_ns             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_FR_ns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano->tp_dict, __pyx_n_s_reso_2, __pyx_t_2) < 0) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano);

  /* "pandas/_libs/tslibs/offsets.pyx":1198
 * 
 * 
 * def delta_to_tick(delta: timedelta) -> Tick:             # <<<<<<<<<<<<<<
 *     if delta.microseconds == 0 and getattr(delta, "nanoseconds", 0) == 0:
 *         # nanoseconds only for pd.Timedelta
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_7delta_to_tick, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_delta_to_tick, __pyx_t_2) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1227
 *     DateOffset subclass backed by a dateutil relativedelta object.
 *     """
 *     _attributes = tuple(["n", "normalize"] + list(_relativedelta_kwds))             # <<<<<<<<<<<<<<
 *     _adjust_dst = False
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_normalize);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_relativedelta_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":1228
 *     """
 *     _attributes = tuple(["n", "normalize"] + list(_relativedelta_kwds))
 *     _adjust_dst = False             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, **kwds):
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset->tp_dict, __pyx_n_s_adjust_dst, Py_False) < 0) __PYX_ERR(0, 1228, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":1269
 *         self.__dict__.update(state)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         if self._use_relativedelta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1270
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         if self._use_relativedelta:
 *             other = _as_datetime(other)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":1300
 *             return other + timedelta(self.n)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1301
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         dt64other = np.asarray(dtarr)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset->tp_dict, __pyx_n_s_apply_array, __pyx_t_4) < 0) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":1364
 * 
 * 
 * class OffsetMeta(type):             # <<<<<<<<<<<<<<
 *     """
 *     Metaclass that allows us to pretend that all BaseOffset subclasses
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyType_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyType_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyType_Type)));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_4, __pyx_n_s_OffsetMeta, __pyx_n_s_OffsetMeta, (PyObject *) NULL, __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_kp_s_Metaclass_that_allows_us_to_pre); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/_libs/tslibs/offsets.pyx":1371
 * 
 *     @classmethod
 *     def __instancecheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return isinstance(obj, BaseOffset)
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1371, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_1__instancecheck__, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_OffsetMeta___instancecheck, NULL, __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1370
 *     """
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __instancecheck__(cls, obj) -> bool:
 *         return isinstance(obj, BaseOffset)
 */
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_instancecheck, __pyx_t_5) < 0) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1375
 * 
 *     @classmethod
 *     def __subclasscheck__(cls, obj) -> bool:             # <<<<<<<<<<<<<<
 *         return issubclass(obj, BaseOffset)
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1375, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10OffsetMeta_3__subclasscheck__, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_OffsetMeta___subclasscheck, NULL, __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1374
 *         return isinstance(obj, BaseOffset)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __subclasscheck__(cls, obj) -> bool:
 *         return issubclass(obj, BaseOffset)
 */
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_subclasscheck, __pyx_t_5) < 0) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1364
 * 
 * 
 * class OffsetMeta(type):             # <<<<<<<<<<<<<<
 *     """
 *     Metaclass that allows us to pretend that all BaseOffset subclasses
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OffsetMeta, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OffsetMeta, __pyx_t_5) < 0) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1380
 * 
 * # TODO: figure out a way to use a metaclass with a cdef class
 * class DateOffset(RelativeDeltaOffset, metaclass=OffsetMeta):             # <<<<<<<<<<<<<<
 *     """
 *     Standard kind of date increment used for a date range.
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_RelativeDeltaOffset));
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OffsetMeta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_n_s_DateOffset, __pyx_n_s_DateOffset, __pyx_t_1, __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_kp_s_Standard_kind_of_date_increment); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pandas/_libs/tslibs/offsets.pyx":1485
 *     Timestamp('2017-01-01 08:10:11')
 *     """
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         raise AttributeError("DateOffset objects are immutable.")
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_10DateOffset_1__setattr__, 0, __pyx_n_s_DateOffset___setattr, NULL, __pyx_n_s_pandas__libs_tslibs_offsets, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_setattr, __pyx_t_6) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1380
 * 
 * # TODO: figure out a way to use a metaclass with a cdef class
 * class DateOffset(RelativeDeltaOffset, metaclass=OffsetMeta):             # <<<<<<<<<<<<<<
 *     """
 *     Standard kind of date increment used for a date range.
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DateOffset, __pyx_t_4, __pyx_t_5, __pyx_t_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DateOffset, __pyx_t_6) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
  __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;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1501
 *         object weekmask, holidays, calendar
 * 
 *     def __init__(self, n=1, normalize=False, offset=timedelta(0)):             # <<<<<<<<<<<<<<
 *         BaseOffset.__init__(self, n, normalize)
 *         self._offset = offset
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__34 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1569
 *     Timestamp('2022-08-08 00:00:00')
 *     """
 *     _period_dtype_code = PeriodDtypeCode.B             # <<<<<<<<<<<<<<
 *     _prefix = "B"
 *     _attributes = tuple(["n", "normalize", "offset"])
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_B); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_4) < 0) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":1570
 *     """
 *     _period_dtype_code = PeriodDtypeCode.B
 *     _prefix = "B"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "offset"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay->tp_dict, __pyx_n_s_prefix, __pyx_n_u_B) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":1571
 *     _period_dtype_code = PeriodDtypeCode.B
 *     _prefix = "B"
 *     _attributes = tuple(["n", "normalize", "offset"])             # <<<<<<<<<<<<<<
 * 
 *     cpdef __setstate__(self, state):
 */
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_offset_2);
  __Pyx_GIVEREF(__pyx_n_u_offset_2);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_offset_2);
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":1613
 *             return "+" + repr(self.offset)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other):
 *         if PyDateTime_Check(other):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":1614
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if PyDateTime_Check(other):
 *             n = self.n
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay->tp_dict, __pyx_n_s_apply, __pyx_t_1) < 0) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":1656
 *             )
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         i8other = dtarr.view("i8")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":1657
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         i8other = dtarr.view("i8")
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay->tp_dict, __pyx_n_s_apply_array, __pyx_t_1) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":1696
 *     """
 * 
 *     _prefix = "BH"             # <<<<<<<<<<<<<<
 *     _anchor = 0
 *     _attributes = tuple(["n", "normalize", "start", "end", "offset"])
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BH) < 0) __PYX_ERR(0, 1696, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1697
 * 
 *     _prefix = "BH"
 *     _anchor = 0             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "start", "end", "offset"])
 *     _adjust_dst = False
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_anchor, __pyx_int_0) < 0) __PYX_ERR(0, 1697, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1698
 *     _prefix = "BH"
 *     _anchor = 0
 *     _attributes = tuple(["n", "normalize", "start", "end", "offset"])             # <<<<<<<<<<<<<<
 *     _adjust_dst = False
 * 
 */
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_start);
  __Pyx_GIVEREF(__pyx_n_u_start);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_start);
  __Pyx_INCREF(__pyx_n_u_end);
  __Pyx_GIVEREF(__pyx_n_u_end);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_end);
  __Pyx_INCREF(__pyx_n_u_offset_2);
  __Pyx_GIVEREF(__pyx_n_u_offset_2);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_offset_2);
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1699
 *     _anchor = 0
 *     _attributes = tuple(["n", "normalize", "start", "end", "offset"])
 *     _adjust_dst = False             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_adjust_dst, Py_False) < 0) __PYX_ERR(0, 1699, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1705
 * 
 *     def __init__(
 *             self, n=1, normalize=False, start="09:00", end="17:00", offset=timedelta(0)             # <<<<<<<<<<<<<<
 *     ):
 *         BusinessMixin.__init__(self, n, normalize, offset)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__40 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1807
 *         assert False
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def next_bday(self):
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1808
 * 
 *     @cache_readonly
 *     def next_bday(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used for moving to next business day.
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour, __pyx_n_s_next_bday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_next_bday, __pyx_t_4) < 0) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1905
 *         return self._next_opening_time(other, sign=-1)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def rollback(self, dt: datetime) -> datetime:
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1906
 * 
 *     @apply_wraps
 *     def rollback(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date backward to next offset only if not on offset.
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour, __pyx_n_s_rollback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_rollback, __pyx_t_4) < 0) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1918
 *         return dt
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def rollforward(self, dt: datetime) -> datetime:
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1919
 * 
 *     @apply_wraps
 *     def rollforward(self, dt: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         """
 *         Roll provided date forward to next offset only if not on offset.
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour, __pyx_n_s_rollforward); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_rollforward, __pyx_t_4) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":1930
 *         return dt
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         # used for detecting edge condition
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":1931
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # used for detecting edge condition
 *         nanosecond = getattr(other, "nanosecond", 0)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":2079
 *             raise ValueError(f"Day must be 0<=day<=6, got {weekday}")
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         compare_day = self._get_offset_day(other)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2080
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         compare_day = self._get_offset_day(other)
 * 
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 2080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonthMixin);

  /* "pandas/_libs/tslibs/offsets.pyx":2111
 *     DateOffset that just needs a month.
 *     """
 *     _attributes = tuple(["n", "normalize", "month"])             # <<<<<<<<<<<<<<
 * 
 *     # FIXME(cython#4446): python annotation here gives compile-time errors
 */
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_month);
  __Pyx_GIVEREF(__pyx_n_u_month);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_month);
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2135
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         kwargs = {}
 *         if suffix:
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset, __pyx_n_s_from_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2134
 *         self._cache = {}
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}
 */
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset->tp_dict, __pyx_n_s_from_name, __pyx_t_4) < 0) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2159
 *         return get_day_of_month(&dts, self._day_opt)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2160
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         years = roll_qtrday(other, self.n, self.month, self._day_opt, modby=12)
 *         months = years * 12 + (self.month - other.month)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2165
 *         return shift_month(other, months, self._day_opt)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2166
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset->tp_dict, __pyx_n_s_apply_array, __pyx_t_4) < 0) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2194
 *     """
 * 
 *     _outputName = "BusinessYearEnd"             # <<<<<<<<<<<<<<
 *     _default_month = 12
 *     _prefix = "BA"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd->tp_dict, __pyx_n_s_outputName, __pyx_n_u_BusinessYearEnd) < 0) __PYX_ERR(0, 2194, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2195
 * 
 *     _outputName = "BusinessYearEnd"
 *     _default_month = 12             # <<<<<<<<<<<<<<
 *     _prefix = "BA"
 *     _day_opt = "business_end"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd->tp_dict, __pyx_n_s_default_month, __pyx_int_12) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2196
 *     _outputName = "BusinessYearEnd"
 *     _default_month = 12
 *     _prefix = "BA"             # <<<<<<<<<<<<<<
 *     _day_opt = "business_end"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BA) < 0) __PYX_ERR(0, 2196, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2197
 *     _default_month = 12
 *     _prefix = "BA"
 *     _day_opt = "business_end"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_business_end) < 0) __PYX_ERR(0, 2197, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2218
 *     """
 * 
 *     _outputName = "BusinessYearBegin"             # <<<<<<<<<<<<<<
 *     _default_month = 1
 *     _prefix = "BAS"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin->tp_dict, __pyx_n_s_outputName, __pyx_n_u_BusinessYearBegin) < 0) __PYX_ERR(0, 2218, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2219
 * 
 *     _outputName = "BusinessYearBegin"
 *     _default_month = 1             # <<<<<<<<<<<<<<
 *     _prefix = "BAS"
 *     _day_opt = "business_start"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin->tp_dict, __pyx_n_s_default_month, __pyx_int_1) < 0) __PYX_ERR(0, 2219, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2220
 *     _outputName = "BusinessYearBegin"
 *     _default_month = 1
 *     _prefix = "BAS"             # <<<<<<<<<<<<<<
 *     _day_opt = "business_start"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BAS) < 0) __PYX_ERR(0, 2220, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2221
 *     _default_month = 1
 *     _prefix = "BAS"
 *     _day_opt = "business_start"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_business_start) < 0) __PYX_ERR(0, 2221, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2235
 *     """
 * 
 *     _default_month = 12             # <<<<<<<<<<<<<<
 *     _prefix = "A"
 *     _day_opt = "end"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd->tp_dict, __pyx_n_s_default_month, __pyx_int_12) < 0) __PYX_ERR(0, 2235, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2236
 * 
 *     _default_month = 12
 *     _prefix = "A"             # <<<<<<<<<<<<<<
 *     _day_opt = "end"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_A) < 0) __PYX_ERR(0, 2236, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2237
 *     _default_month = 12
 *     _prefix = "A"
 *     _day_opt = "end"             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_end) < 0) __PYX_ERR(0, 2237, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2260
 *     """
 * 
 *     _default_month = 1             # <<<<<<<<<<<<<<
 *     _prefix = "AS"
 *     _day_opt = "start"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin->tp_dict, __pyx_n_s_default_month, __pyx_int_1) < 0) __PYX_ERR(0, 2260, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2261
 * 
 *     _default_month = 1
 *     _prefix = "AS"             # <<<<<<<<<<<<<<
 *     _day_opt = "start"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_AS) < 0) __PYX_ERR(0, 2261, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2262
 *     _default_month = 1
 *     _prefix = "AS"
 *     _day_opt = "start"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_start) < 0) __PYX_ERR(0, 2262, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2269
 * 
 * cdef class QuarterOffset(SingleConstructorOffset):
 *     _attributes = tuple(["n", "normalize", "startingMonth"])             # <<<<<<<<<<<<<<
 *     # TODO: Consider combining QuarterOffset and YearOffset __init__ at some
 *     #       point.  Also apply_index, is_on_offset, rule_code if
 */
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_startingMonth);
  __Pyx_GIVEREF(__pyx_n_u_startingMonth);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_startingMonth);
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 2269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2294
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         kwargs = {}
 *         if suffix:
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset, __pyx_n_s_from_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2293
 *         self.normalize = state.pop("normalize")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         kwargs = {}
 */
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset->tp_dict, __pyx_n_s_from_name, __pyx_t_4) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2317
 *         return mod_month == 0 and dt.day == self._get_offset_day(dt)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         # months_since: find the calendar quarter containing other.month,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2318
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # months_since: find the calendar quarter containing other.month,
 *         # e.g. if other.month == 8, the calendar quarter is [Jul, Aug, Sep].
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2331
 *         return shift_month(other, months, self._day_opt)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2332
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_quarters(
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset->tp_dict, __pyx_n_s_apply_array, __pyx_t_4) < 0) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2361
 *     Timestamp('2020-05-29 05:01:15')
 *     """
 *     _output_name = "BusinessQuarterEnd"             # <<<<<<<<<<<<<<
 *     _default_starting_month = 3
 *     _from_name_starting_month = 12
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd->tp_dict, __pyx_n_s_output_name, __pyx_n_u_BusinessQuarterEnd) < 0) __PYX_ERR(0, 2361, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2362
 *     """
 *     _output_name = "BusinessQuarterEnd"
 *     _default_starting_month = 3             # <<<<<<<<<<<<<<
 *     _from_name_starting_month = 12
 *     _prefix = "BQ"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd->tp_dict, __pyx_n_s_default_starting_month, __pyx_int_3) < 0) __PYX_ERR(0, 2362, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2363
 *     _output_name = "BusinessQuarterEnd"
 *     _default_starting_month = 3
 *     _from_name_starting_month = 12             # <<<<<<<<<<<<<<
 *     _prefix = "BQ"
 *     _day_opt = "business_end"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd->tp_dict, __pyx_n_s_from_name_starting_month, __pyx_int_12) < 0) __PYX_ERR(0, 2363, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2364
 *     _default_starting_month = 3
 *     _from_name_starting_month = 12
 *     _prefix = "BQ"             # <<<<<<<<<<<<<<
 *     _day_opt = "business_end"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BQ) < 0) __PYX_ERR(0, 2364, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2365
 *     _from_name_starting_month = 12
 *     _prefix = "BQ"
 *     _day_opt = "business_end"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_business_end) < 0) __PYX_ERR(0, 2365, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2389
 *     Timestamp('2020-03-02 05:01:15')
 *     """
 *     _output_name = "BusinessQuarterBegin"             # <<<<<<<<<<<<<<
 *     _default_starting_month = 3
 *     _from_name_starting_month = 1
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin->tp_dict, __pyx_n_s_output_name, __pyx_n_u_BusinessQuarterBegin) < 0) __PYX_ERR(0, 2389, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2390
 *     """
 *     _output_name = "BusinessQuarterBegin"
 *     _default_starting_month = 3             # <<<<<<<<<<<<<<
 *     _from_name_starting_month = 1
 *     _prefix = "BQS"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin->tp_dict, __pyx_n_s_default_starting_month, __pyx_int_3) < 0) __PYX_ERR(0, 2390, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2391
 *     _output_name = "BusinessQuarterBegin"
 *     _default_starting_month = 3
 *     _from_name_starting_month = 1             # <<<<<<<<<<<<<<
 *     _prefix = "BQS"
 *     _day_opt = "business_start"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin->tp_dict, __pyx_n_s_from_name_starting_month, __pyx_int_1) < 0) __PYX_ERR(0, 2391, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2392
 *     _default_starting_month = 3
 *     _from_name_starting_month = 1
 *     _prefix = "BQS"             # <<<<<<<<<<<<<<
 *     _day_opt = "business_start"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BQS) < 0) __PYX_ERR(0, 2392, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2393
 *     _from_name_starting_month = 1
 *     _prefix = "BQS"
 *     _day_opt = "business_start"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_business_start) < 0) __PYX_ERR(0, 2393, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2410
 *     Timestamp('2022-03-31 00:00:00')
 *     """
 *     _default_starting_month = 3             # <<<<<<<<<<<<<<
 *     _prefix = "Q"
 *     _day_opt = "end"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd->tp_dict, __pyx_n_s_default_starting_month, __pyx_int_3) < 0) __PYX_ERR(0, 2410, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2411
 *     """
 *     _default_starting_month = 3
 *     _prefix = "Q"             # <<<<<<<<<<<<<<
 *     _day_opt = "end"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_Q) < 0) __PYX_ERR(0, 2411, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2412
 *     _default_starting_month = 3
 *     _prefix = "Q"
 *     _day_opt = "end"             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_end) < 0) __PYX_ERR(0, 2412, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2438
 *     Timestamp('2022-03-01 00:00:00')
 *     """
 *     _default_starting_month = 3             # <<<<<<<<<<<<<<
 *     _from_name_starting_month = 1
 *     _prefix = "QS"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin->tp_dict, __pyx_n_s_default_starting_month, __pyx_int_3) < 0) __PYX_ERR(0, 2438, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2439
 *     """
 *     _default_starting_month = 3
 *     _from_name_starting_month = 1             # <<<<<<<<<<<<<<
 *     _prefix = "QS"
 *     _day_opt = "start"
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin->tp_dict, __pyx_n_s_from_name_starting_month, __pyx_int_1) < 0) __PYX_ERR(0, 2439, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2440
 *     _default_starting_month = 3
 *     _from_name_starting_month = 1
 *     _prefix = "QS"             # <<<<<<<<<<<<<<
 *     _day_opt = "start"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_QS) < 0) __PYX_ERR(0, 2440, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2441
 *     _from_name_starting_month = 1
 *     _prefix = "QS"
 *     _day_opt = "start"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_start) < 0) __PYX_ERR(0, 2441, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2453
 *         return dt.day == self._get_offset_day(dt)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         compare_day = self._get_offset_day(other)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2454
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         compare_day = self._get_offset_day(other)
 *         n = roll_convention(other.day, self.n, compare_day)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 2454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2459
 *         return shift_month(other, n, self._day_opt)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         reso = get_unit_from_dtype(dtarr.dtype)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2460
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         reso = get_unit_from_dtype(dtarr.dtype)
 *         shifted = shift_months(dtarr.view("i8"), self.n, self._day_opt, reso=reso)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset->tp_dict, __pyx_n_s_apply_array, __pyx_t_4) < 0) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2484
 *     Timestamp('2022-01-31 00:00:00')
 *     """
 *     _period_dtype_code = PeriodDtypeCode.M             # <<<<<<<<<<<<<<
 *     _prefix = "M"
 *     _day_opt = "end"
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(__pyx_e_6pandas_5_libs_6tslibs_6dtypes_M); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd->tp_dict, __pyx_n_s_period_dtype_code, __pyx_t_4) < 0) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2485
 *     """
 *     _period_dtype_code = PeriodDtypeCode.M
 *     _prefix = "M"             # <<<<<<<<<<<<<<
 *     _day_opt = "end"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_M) < 0) __PYX_ERR(0, 2485, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2486
 *     _period_dtype_code = PeriodDtypeCode.M
 *     _prefix = "M"
 *     _day_opt = "end"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_end) < 0) __PYX_ERR(0, 2486, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2499
 *     Timestamp('2022-02-01 00:00:00')
 *     """
 *     _prefix = "MS"             # <<<<<<<<<<<<<<
 *     _day_opt = "start"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_MS) < 0) __PYX_ERR(0, 2499, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2500
 *     """
 *     _prefix = "MS"
 *     _day_opt = "start"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_start) < 0) __PYX_ERR(0, 2500, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2518
 *     Timestamp('2020-03-31 05:01:15')
 *     """
 *     _prefix = "BM"             # <<<<<<<<<<<<<<
 *     _day_opt = "business_end"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BM) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2519
 *     """
 *     _prefix = "BM"
 *     _day_opt = "business_end"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_business_end) < 0) __PYX_ERR(0, 2519, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2537
 *     Timestamp('2020-03-02 05:01:15')
 *     """
 *     _prefix = "BMS"             # <<<<<<<<<<<<<<
 *     _day_opt = "business_start"
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_BMS) < 0) __PYX_ERR(0, 2537, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2538
 *     """
 *     _prefix = "BMS"
 *     _day_opt = "business_start"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin->tp_dict, __pyx_n_s_day_opt, __pyx_n_u_business_start) < 0) __PYX_ERR(0, 2538, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2545
 * 
 * cdef class SemiMonthOffset(SingleConstructorOffset):
 *     _default_day_of_month = 15             # <<<<<<<<<<<<<<
 *     _min_day_of_month = 2
 *     _attributes = tuple(["n", "normalize", "day_of_month"])
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset->tp_dict, __pyx_n_s_default_day_of_month, __pyx_int_15) < 0) __PYX_ERR(0, 2545, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2546
 * cdef class SemiMonthOffset(SingleConstructorOffset):
 *     _default_day_of_month = 15
 *     _min_day_of_month = 2             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "day_of_month"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset->tp_dict, __pyx_n_s_min_day_of_month, __pyx_int_2) < 0) __PYX_ERR(0, 2546, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2547
 *     _default_day_of_month = 15
 *     _min_day_of_month = 2
 *     _attributes = tuple(["n", "normalize", "day_of_month"])             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_day_of_month);
  __Pyx_GIVEREF(__pyx_n_u_day_of_month);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_day_of_month);
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 2547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2572
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         return cls(day_of_month=suffix)
 * 
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset, __pyx_n_s_from_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2571
 *         self.day_of_month = state.pop("day_of_month")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         return cls(day_of_month=suffix)
 */
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset->tp_dict, __pyx_n_s_from_name, __pyx_t_4) < 0) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2580
 *         return self._prefix + suffix
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         is_start = isinstance(self, SemiMonthBegin)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2581
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         is_start = isinstance(self, SemiMonthBegin)
 * 
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2607
 *         return shift_month(other, months, to_day)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     @cython.wraparound(False)
 *     @cython.boundscheck(False)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2610
 *     @cython.wraparound(False)
 *     @cython.boundscheck(False)
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray i8other = dtarr.view("i8")
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset->tp_dict, __pyx_n_s_apply_array, __pyx_t_4) < 0) __PYX_ERR(0, 2610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthOffset);

  /* "pandas/_libs/tslibs/offsets.pyx":2692
 *     """
 * 
 *     _prefix = "SM"             # <<<<<<<<<<<<<<
 *     _min_day_of_month = 1
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_SM) < 0) __PYX_ERR(0, 2692, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2693
 * 
 *     _prefix = "SM"
 *     _min_day_of_month = 1             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd->tp_dict, __pyx_n_s_min_day_of_month, __pyx_int_1) < 0) __PYX_ERR(0, 2693, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":2719
 *     """
 * 
 *     _prefix = "SMS"             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_SMS) < 0) __PYX_ERR(0, 2719, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":2747
 *     """
 * 
 *     _inc = timedelta(weeks=1)             # <<<<<<<<<<<<<<
 *     _prefix = "W"
 *     _attributes = tuple(["n", "normalize", "weekday"])
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_weeks, __pyx_int_1) < 0) __PYX_ERR(0, 2747, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week->tp_dict, __pyx_n_s_inc_2, __pyx_t_1) < 0) __PYX_ERR(0, 2747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week);

  /* "pandas/_libs/tslibs/offsets.pyx":2748
 * 
 *     _inc = timedelta(weeks=1)
 *     _prefix = "W"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "weekday"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week->tp_dict, __pyx_n_s_prefix, __pyx_n_u_W) < 0) __PYX_ERR(0, 2748, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week);

  /* "pandas/_libs/tslibs/offsets.pyx":2749
 *     _inc = timedelta(weeks=1)
 *     _prefix = "W"
 *     _attributes = tuple(["n", "normalize", "weekday"])             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekday);
  __Pyx_GIVEREF(__pyx_n_u_weekday);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_weekday);
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week);

  /* "pandas/_libs/tslibs/offsets.pyx":2774
 *         return self.n == 1 and self.weekday is not None
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other):
 *         if self.weekday is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2775
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if self.weekday is None:
 *             return other + self.n * self._inc
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week);

  /* "pandas/_libs/tslibs/offsets.pyx":2793
 *         return other + timedelta(weeks=k)
 * 
 *     @apply_array_wraps             # <<<<<<<<<<<<<<
 *     def _apply_array(self, dtarr):
 *         if self.weekday is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_array_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":2794
 * 
 *     @apply_array_wraps
 *     def _apply_array(self, dtarr):             # <<<<<<<<<<<<<<
 *         if self.weekday is None:
 *             td = timedelta(days=7 * self.n)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week, __pyx_n_s_apply_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week->tp_dict, __pyx_n_s_apply_array, __pyx_t_4) < 0) __PYX_ERR(0, 2794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week);

  /* "pandas/_libs/tslibs/offsets.pyx":2873
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             weekday = None
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week, __pyx_n_s_from_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":2872
 *         return self._prefix + suffix
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         if not suffix:
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week->tp_dict, __pyx_n_s_from_name, __pyx_t_1) < 0) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week);

  /* "pandas/_libs/tslibs/offsets.pyx":2909
 *     """
 * 
 *     _prefix = "WOM"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "week", "weekday"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth->tp_dict, __pyx_n_s_prefix, __pyx_n_u_WOM) < 0) __PYX_ERR(0, 2909, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":2910
 * 
 *     _prefix = "WOM"
 *     _attributes = tuple(["n", "normalize", "week", "weekday"])             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, week=0, weekday=0):
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_week);
  __Pyx_GIVEREF(__pyx_n_u_week);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_week);
  __Pyx_INCREF(__pyx_n_u_weekday);
  __Pyx_GIVEREF(__pyx_n_u_weekday);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_weekday);
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 2910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":2944
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth, __pyx_n_s_from_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":2943
 *         return 1 + shift_days + self.week * 7
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         if not suffix:
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth->tp_dict, __pyx_n_s_from_name, __pyx_t_1) < 0) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":2980
 *     """
 * 
 *     _prefix = "LWOM"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "weekday"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth->tp_dict, __pyx_n_s_prefix, __pyx_n_u_LWOM) < 0) __PYX_ERR(0, 2980, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":2981
 * 
 *     _prefix = "LWOM"
 *     _attributes = tuple(["n", "normalize", "weekday"])             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, n=1, normalize=False, weekday=0):
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekday);
  __Pyx_GIVEREF(__pyx_n_u_weekday);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_weekday);
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 2981, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3016
 * 
 *     @classmethod
 *     def _from_name(cls, suffix=None):             # <<<<<<<<<<<<<<
 *         if not suffix:
 *             raise ValueError(f"Prefix {repr(cls._prefix)} requires a suffix.")
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth, __pyx_n_s_from_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3015
 *         return dim - shift_days
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, suffix=None):
 *         if not suffix:
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth->tp_dict, __pyx_n_s_from_name, __pyx_t_1) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_LastWeekOfMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3133
 *     """
 * 
 *     _prefix = "RE"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(["n", "normalize", "weekday", "startingMonth", "variation"])
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253->tp_dict, __pyx_n_s_prefix, __pyx_n_u_RE) < 0) __PYX_ERR(0, 3133, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253);

  /* "pandas/_libs/tslibs/offsets.pyx":3134
 * 
 *     _prefix = "RE"
 *     _attributes = tuple(["n", "normalize", "weekday", "startingMonth", "variation"])             # <<<<<<<<<<<<<<
 * 
 *     def is_on_offset(self, dt: datetime) -> bool:
 */
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekday);
  __Pyx_GIVEREF(__pyx_n_u_weekday);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_weekday);
  __Pyx_INCREF(__pyx_n_u_startingMonth);
  __Pyx_GIVEREF(__pyx_n_u_startingMonth);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_startingMonth);
  __Pyx_INCREF(__pyx_n_u_variation);
  __Pyx_GIVEREF(__pyx_n_u_variation);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_variation);
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253);

  /* "pandas/_libs/tslibs/offsets.pyx":3148
 *             return year_end == dt
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         norm = Timestamp(other).normalize()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":3149
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         norm = Timestamp(other).normalize()
 * 
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253);

  /* "pandas/_libs/tslibs/offsets.pyx":3231
 * 
 *     @classmethod
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):             # <<<<<<<<<<<<<<
 *         if varion_code == "N":
 *             variation = "nearest"
 */
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253, __pyx_n_s_parse_suffix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3230
 *                 return target_date + timedelta(days_forward - 7)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _parse_suffix(cls, varion_code, startingMonth_code, weekday_code):
 *         if varion_code == "N":
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253->tp_dict, __pyx_n_s_parse_suffix, __pyx_t_1) < 0) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253);

  /* "pandas/_libs/tslibs/offsets.pyx":3249
 * 
 *     @classmethod
 *     def _from_name(cls, *args):             # <<<<<<<<<<<<<<
 *         return cls(**cls._parse_suffix(*args))
 * 
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253, __pyx_n_s_from_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":3248
 *         }
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, *args):
 *         return cls(**cls._parse_suffix(*args))
 */
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253->tp_dict, __pyx_n_s_from_name, __pyx_t_4) < 0) __PYX_ERR(0, 3249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253);

  /* "pandas/_libs/tslibs/offsets.pyx":3316
 *     """
 * 
 *     _prefix = "REQ"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(
 *         [
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter->tp_dict, __pyx_n_s_prefix, __pyx_n_u_REQ) < 0) __PYX_ERR(0, 3316, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter);

  /* "pandas/_libs/tslibs/offsets.pyx":3318
 *     _prefix = "REQ"
 *     _attributes = tuple(
 *         [             # <<<<<<<<<<<<<<
 *             "n",
 *             "normalize",
 */
  __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekday);
  __Pyx_GIVEREF(__pyx_n_u_weekday);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_weekday);
  __Pyx_INCREF(__pyx_n_u_startingMonth);
  __Pyx_GIVEREF(__pyx_n_u_startingMonth);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_startingMonth);
  __Pyx_INCREF(__pyx_n_u_qtr_with_extra_week);
  __Pyx_GIVEREF(__pyx_n_u_qtr_with_extra_week);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_u_qtr_with_extra_week);
  __Pyx_INCREF(__pyx_n_u_variation);
  __Pyx_GIVEREF(__pyx_n_u_variation);
  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_u_variation);

  /* "pandas/_libs/tslibs/offsets.pyx":3317
 * 
 *     _prefix = "REQ"
 *     _attributes = tuple(             # <<<<<<<<<<<<<<
 *         [
 *             "n",
 */
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 3317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter);

  /* "pandas/_libs/tslibs/offsets.pyx":3349
 *         self.qtr_with_extra_week = state.pop("qtr_with_extra_week")
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def _offset(self):
 *         return FY5253(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3350
 * 
 *     @cache_readonly
 *     def _offset(self):             # <<<<<<<<<<<<<<
 *         return FY5253(
 *             startingMonth=self.startingMonth,
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter, __pyx_n_s_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter->tp_dict, __pyx_n_s_offset, __pyx_t_1) < 0) __PYX_ERR(0, 3350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter);

  /* "pandas/_libs/tslibs/offsets.pyx":3404
 *         return start, num_qtrs, tdelta
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         # Note: self.n == 0 is not allowed.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3405
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # Note: self.n == 0 is not allowed.
 * 
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter->tp_dict, __pyx_n_s_apply, __pyx_t_1) < 0) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter);

  /* "pandas/_libs/tslibs/offsets.pyx":3478
 * 
 *     @classmethod
 *     def _from_name(cls, *args):             # <<<<<<<<<<<<<<
 *         return cls(
 *             **dict(FY5253._parse_suffix(*args[:-1]), qtr_with_extra_week=int(args[-1]))
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter, __pyx_n_s_from_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":3477
 *         return f"{suffix}-{qtr}"
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_name(cls, *args):
 *         return cls(
 */
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter->tp_dict, __pyx_n_s_from_name, __pyx_t_4) < 0) __PYX_ERR(0, 3478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter);

  /* "pandas/_libs/tslibs/offsets.pyx":3501
 *         self.normalize = state.pop("normalize")
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         current_easter = easter(other.year)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/_libs/tslibs/offsets.pyx":3502
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         current_easter = easter(other.year)
 *         current_easter = datetime(
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Easter, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Easter->tp_dict, __pyx_n_s_apply, __pyx_t_4) < 0) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Easter);

  /* "pandas/_libs/tslibs/offsets.pyx":3564
 *     """
 * 
 *     _prefix = "C"             # <<<<<<<<<<<<<<
 *     _attributes = tuple(
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "offset"]
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay->tp_dict, __pyx_n_s_prefix, __pyx_n_u_C) < 0) __PYX_ERR(0, 3564, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":3566
 *     _prefix = "C"
 *     _attributes = tuple(
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "offset"]             # <<<<<<<<<<<<<<
 *     )
 * 
 */
  __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekmask);
  __Pyx_GIVEREF(__pyx_n_u_weekmask);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_weekmask);
  __Pyx_INCREF(__pyx_n_u_holidays);
  __Pyx_GIVEREF(__pyx_n_u_holidays);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_holidays);
  __Pyx_INCREF(__pyx_n_u_calendar);
  __Pyx_GIVEREF(__pyx_n_u_calendar);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_u_calendar);
  __Pyx_INCREF(__pyx_n_u_offset_2);
  __Pyx_GIVEREF(__pyx_n_u_offset_2);
  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_u_offset_2);

  /* "pandas/_libs/tslibs/offsets.pyx":3565
 * 
 *     _prefix = "C"
 *     _attributes = tuple(             # <<<<<<<<<<<<<<
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "offset"]
 *     )
 */
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":3569
 *     )
 * 
 *     _apply_array = BaseOffset._apply_array             # <<<<<<<<<<<<<<
 * 
 *     def __init__(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BaseOffset), __pyx_n_s_apply_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay->tp_dict, __pyx_n_s_apply_array, __pyx_t_1) < 0) __PYX_ERR(0, 3569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":3578
 *         holidays=None,
 *         calendar=None,
 *         offset=timedelta(0),             # <<<<<<<<<<<<<<
 *     ):
 *         BusinessDay.__init__(self, n, normalize, offset)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__56 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3588
 *         BusinessDay.__setstate__(self, state)
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other):
 *         if self.n <= 0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3589
 * 
 *     @apply_wraps
 *     def _apply(self, other):             # <<<<<<<<<<<<<<
 *         if self.n <= 0:
 *             roll = "forward"
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay->tp_dict, __pyx_n_s_apply, __pyx_t_1) < 0) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay);

  /* "pandas/_libs/tslibs/offsets.pyx":3650
 *     """
 * 
 *     _prefix = "CBH"             # <<<<<<<<<<<<<<
 *     _anchor = 0
 *     _attributes = tuple(
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour->tp_dict, __pyx_n_s_prefix, __pyx_n_u_CBH) < 0) __PYX_ERR(0, 3650, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":3651
 * 
 *     _prefix = "CBH"
 *     _anchor = 0             # <<<<<<<<<<<<<<
 *     _attributes = tuple(
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "start", "end", "offset"]
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour->tp_dict, __pyx_n_s_anchor, __pyx_int_0) < 0) __PYX_ERR(0, 3651, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":3653
 *     _anchor = 0
 *     _attributes = tuple(
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "start", "end", "offset"]             # <<<<<<<<<<<<<<
 *     )
 * 
 */
  __pyx_t_1 = PyList_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekmask);
  __Pyx_GIVEREF(__pyx_n_u_weekmask);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_weekmask);
  __Pyx_INCREF(__pyx_n_u_holidays);
  __Pyx_GIVEREF(__pyx_n_u_holidays);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_holidays);
  __Pyx_INCREF(__pyx_n_u_calendar);
  __Pyx_GIVEREF(__pyx_n_u_calendar);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_calendar);
  __Pyx_INCREF(__pyx_n_u_start);
  __Pyx_GIVEREF(__pyx_n_u_start);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_u_start);
  __Pyx_INCREF(__pyx_n_u_end);
  __Pyx_GIVEREF(__pyx_n_u_end);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_u_end);
  __Pyx_INCREF(__pyx_n_u_offset_2);
  __Pyx_GIVEREF(__pyx_n_u_offset_2);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_u_offset_2);

  /* "pandas/_libs/tslibs/offsets.pyx":3652
 *     _prefix = "CBH"
 *     _anchor = 0
 *     _attributes = tuple(             # <<<<<<<<<<<<<<
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "start", "end", "offset"]
 *     )
 */
  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour->tp_dict, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 3652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour);

  /* "pandas/_libs/tslibs/offsets.pyx":3665
 *         start="09:00",
 *         end="17:00",
 *         offset=timedelta(0),             # <<<<<<<<<<<<<<
 *     ):
 *         BusinessHour.__init__(self, n, normalize, start=start, end=end, offset=offset)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__57 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3695
 * 
 *     _attributes = tuple(
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "offset"]             # <<<<<<<<<<<<<<
 *     )
 * 
 */
  __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_n);
  __Pyx_GIVEREF(__pyx_n_u_n);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_n);
  __Pyx_INCREF(__pyx_n_u_normalize);
  __Pyx_GIVEREF(__pyx_n_u_normalize);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_normalize);
  __Pyx_INCREF(__pyx_n_u_weekmask);
  __Pyx_GIVEREF(__pyx_n_u_weekmask);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_weekmask);
  __Pyx_INCREF(__pyx_n_u_holidays);
  __Pyx_GIVEREF(__pyx_n_u_holidays);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_holidays);
  __Pyx_INCREF(__pyx_n_u_calendar);
  __Pyx_GIVEREF(__pyx_n_u_calendar);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_u_calendar);
  __Pyx_INCREF(__pyx_n_u_offset_2);
  __Pyx_GIVEREF(__pyx_n_u_offset_2);
  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_u_offset_2);

  /* "pandas/_libs/tslibs/offsets.pyx":3694
 *     """
 * 
 *     _attributes = tuple(             # <<<<<<<<<<<<<<
 *         ["n", "normalize", "weekmask", "holidays", "calendar", "offset"]
 *     )
 */
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth->tp_dict, __pyx_n_s_attributes, __pyx_t_1) < 0) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3705
 *         holidays=None,
 *         calendar=None,
 *         offset=timedelta(0),             # <<<<<<<<<<<<<<
 *     ):
 *         BusinessMixin.__init__(self, n, normalize, offset)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_8datetime_timedelta), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__58 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3710
 *         self._init_custom(weekmask, holidays, calendar)
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def cbday_roll(self):
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3711
 * 
 *     @cache_readonly
 *     def cbday_roll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Define default roll function to be called in apply method.
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth, __pyx_n_s_cbday_roll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth->tp_dict, __pyx_n_s_cbday_roll, __pyx_t_1) < 0) __PYX_ERR(0, 3711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3728
 *         return roll_func
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def m_offset(self):
 *         if self._prefix.endswith("S"):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3729
 * 
 *     @cache_readonly
 *     def m_offset(self):             # <<<<<<<<<<<<<<
 *         if self._prefix.endswith("S"):
 *             # MonthBegin
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth, __pyx_n_s_m_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth->tp_dict, __pyx_n_s_m_offset, __pyx_t_1) < 0) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3738
 *         return moff
 * 
 *     @cache_readonly             # <<<<<<<<<<<<<<
 *     def month_roll(self):
 *         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache_readonly); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3739
 * 
 *     @cache_readonly
 *     def month_roll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Define default roll function to be called in apply method.
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth, __pyx_n_s_month_roll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth->tp_dict, __pyx_n_s_month_roll, __pyx_t_1) < 0) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3751
 *         return roll_func
 * 
 *     @apply_wraps             # <<<<<<<<<<<<<<
 *     def _apply(self, other: datetime) -> datetime:
 *         # First move to month offset
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_apply_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pandas/_libs/tslibs/offsets.pyx":3752
 * 
 *     @apply_wraps
 *     def _apply(self, other: datetime) -> datetime:             # <<<<<<<<<<<<<<
 *         # First move to month offset
 *         cur_month_offset_date = self.month_roll(other)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth->tp_dict, __pyx_n_s_apply, __pyx_t_1) < 0) __PYX_ERR(0, 3752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets__CustomBusinessMonth);

  /* "pandas/_libs/tslibs/offsets.pyx":3769
 * 
 * cdef class CustomBusinessMonthEnd(_CustomBusinessMonth):
 *     _prefix = "CBM"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd->tp_dict, __pyx_n_s_prefix, __pyx_n_u_CBM) < 0) __PYX_ERR(0, 3769, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd);

  /* "pandas/_libs/tslibs/offsets.pyx":3773
 * 
 * cdef class CustomBusinessMonthBegin(_CustomBusinessMonth):
 *     _prefix = "CBMS"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin->tp_dict, __pyx_n_s_prefix, __pyx_n_u_CBMS) < 0) __PYX_ERR(0, 3773, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin);

  /* "pandas/_libs/tslibs/offsets.pyx":3776
 * 
 * 
 * BDay = BusinessDay             # <<<<<<<<<<<<<<
 * BMonthEnd = BusinessMonthEnd
 * BMonthBegin = BusinessMonthBegin
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BDay, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay)) < 0) __PYX_ERR(0, 3776, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3777
 * 
 * BDay = BusinessDay
 * BMonthEnd = BusinessMonthEnd             # <<<<<<<<<<<<<<
 * BMonthBegin = BusinessMonthBegin
 * CBMonthEnd = CustomBusinessMonthEnd
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BMonthEnd, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd)) < 0) __PYX_ERR(0, 3777, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3778
 * BDay = BusinessDay
 * BMonthEnd = BusinessMonthEnd
 * BMonthBegin = BusinessMonthBegin             # <<<<<<<<<<<<<<
 * CBMonthEnd = CustomBusinessMonthEnd
 * CBMonthBegin = CustomBusinessMonthBegin
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BMonthBegin, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin)) < 0) __PYX_ERR(0, 3778, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3779
 * BMonthEnd = BusinessMonthEnd
 * BMonthBegin = BusinessMonthBegin
 * CBMonthEnd = CustomBusinessMonthEnd             # <<<<<<<<<<<<<<
 * CBMonthBegin = CustomBusinessMonthBegin
 * CDay = CustomBusinessDay
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CBMonthEnd, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd)) < 0) __PYX_ERR(0, 3779, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3780
 * BMonthBegin = BusinessMonthBegin
 * CBMonthEnd = CustomBusinessMonthEnd
 * CBMonthBegin = CustomBusinessMonthBegin             # <<<<<<<<<<<<<<
 * CDay = CustomBusinessDay
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CBMonthBegin, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin)) < 0) __PYX_ERR(0, 3780, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3781
 * CBMonthEnd = CustomBusinessMonthEnd
 * CBMonthBegin = CustomBusinessMonthBegin
 * CDay = CustomBusinessDay             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CDay, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay)) < 0) __PYX_ERR(0, 3781, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3786
 * # to_offset helpers
 * 
 * prefix_mapping = {             # <<<<<<<<<<<<<<
 *     offset._prefix: offset
 *     for offset in [
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3786, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "pandas/_libs/tslibs/offsets.pyx":3788
 * prefix_mapping = {
 *     offset._prefix: offset
 *     for offset in [             # <<<<<<<<<<<<<<
 *         YearBegin,  # 'AS'
 *         YearEnd,  # 'A'
 */
    __pyx_t_4 = PyTuple_New(31); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_YearEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BYearEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay));
    PyTuple_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessDay));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 5, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 6, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessMonthEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 8, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BQuarterBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour));
    PyTuple_SET_ITEM(__pyx_t_4, 9, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_BusinessHour));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay));
    PyTuple_SET_ITEM(__pyx_t_4, 10, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessDay));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 11, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 12, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessMonthBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour));
    PyTuple_SET_ITEM(__pyx_t_4, 13, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_CustomBusinessHour));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 14, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 15, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_MonthBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano));
    PyTuple_SET_ITEM(__pyx_t_4, 16, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Nano));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 17, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 18, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_SemiMonthBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week));
    PyTuple_SET_ITEM(__pyx_t_4, 19, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Week));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second));
    PyTuple_SET_ITEM(__pyx_t_4, 20, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Second));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute));
    PyTuple_SET_ITEM(__pyx_t_4, 21, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Minute));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro));
    PyTuple_SET_ITEM(__pyx_t_4, 22, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Micro));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd));
    PyTuple_SET_ITEM(__pyx_t_4, 23, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterEnd));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin));
    PyTuple_SET_ITEM(__pyx_t_4, 24, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_QuarterBegin));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli));
    PyTuple_SET_ITEM(__pyx_t_4, 25, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Milli));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour));
    PyTuple_SET_ITEM(__pyx_t_4, 26, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Hour));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day));
    PyTuple_SET_ITEM(__pyx_t_4, 27, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_Day));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth));
    PyTuple_SET_ITEM(__pyx_t_4, 28, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_WeekOfMonth));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253));
    PyTuple_SET_ITEM(__pyx_t_4, 29, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253));
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter));
    PyTuple_SET_ITEM(__pyx_t_4, 30, ((PyObject *)__pyx_ptype_6pandas_5_libs_6tslibs_7offsets_FY5253Quarter));
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (__pyx_t_7 >= 31) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3788, __pyx_L4_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XGOTREF(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset);
      __Pyx_DECREF_SET(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset, ((PyObject *)__pyx_t_4));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3787
 * 
 * prefix_mapping = {
 *     offset._prefix: offset             # <<<<<<<<<<<<<<
 *     for offset in [
 *         YearBegin,  # 'AS'
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset, __pyx_n_s_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3787, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_4, (PyObject*)__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset))) __PYX_ERR(0, 3787, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pandas/_libs/tslibs/offsets.pyx":3788
 * prefix_mapping = {
 *     offset._prefix: offset
 *     for offset in [             # <<<<<<<<<<<<<<
 *         YearBegin,  # 'AS'
 *         YearEnd,  # 'A'
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset);
    __Pyx_DECREF_SET(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset, Py_None);
    goto __pyx_L7_exit_scope;
    __pyx_L4_error:;
    __Pyx_GOTREF(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset);
    __Pyx_DECREF_SET(__pyx_9genexpr15__pyx_v_6pandas_5_libs_6tslibs_7offsets_offset, Py_None);
    goto __pyx_L1_error;
    __pyx_L7_exit_scope:;
  } /* exit inner scope */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_prefix_mapping, __pyx_t_1) < 0) __PYX_ERR(0, 3786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3824
 * 
 * # hack to handle WOM-1MON
 * opattern = re.compile(             # <<<<<<<<<<<<<<
 *     r"([+\-]?\d*|[+\-]?\d*\.\d*)\s*([A-Za-z]+([\-][\dA-Za-z\-]+)?)"
 * )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_opattern, __pyx_t_1) < 0) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3829
 * 
 * _lite_rule_alias = {
 *     "W": "W-SUN",             # <<<<<<<<<<<<<<
 *     "Q": "Q-DEC",
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_W, __pyx_kp_u_W_SUN) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Q, __pyx_kp_u_Q_DEC) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_A, __pyx_kp_u_A_DEC) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Y, __pyx_kp_u_A_DEC) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_AS, __pyx_kp_u_AS_JAN) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_YS, __pyx_kp_u_AS_JAN) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_BA, __pyx_kp_u_BA_DEC) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_BY, __pyx_kp_u_BA_DEC) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_BAS, __pyx_kp_u_BAS_JAN) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_BYS, __pyx_kp_u_BAS_JAN) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Min, __pyx_n_u_T) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_min, __pyx_n_u_T) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ms, __pyx_n_u_L) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_us, __pyx_n_u_U) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ns, __pyx_n_u_N) < 0) __PYX_ERR(0, 3829, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lite_rule_alias, __pyx_t_1) < 0) __PYX_ERR(0, 3828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3848
 * }
 * 
 * _dont_uppercase = {"MS", "ms"}             # <<<<<<<<<<<<<<
 * 
 * INVALID_FREQ_ERR_MSG = "Invalid frequency: {0}"
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PySet_Add(__pyx_t_1, __pyx_n_u_MS) < 0) __PYX_ERR(0, 3848, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_n_u_ms) < 0) __PYX_ERR(0, 3848, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dont_uppercase, __pyx_t_1) < 0) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3850
 * _dont_uppercase = {"MS", "ms"}
 * 
 * INVALID_FREQ_ERR_MSG = "Invalid frequency: {0}"             # <<<<<<<<<<<<<<
 * 
 * # TODO: still needed?
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_INVALID_FREQ_ERR_MSG, __pyx_kp_u_Invalid_frequency_0) < 0) __PYX_ERR(0, 3850, __pyx_L1_error)

  /* "pandas/_libs/tslibs/offsets.pyx":3854
 * # TODO: still needed?
 * # cache of previously seen offsets
 * _offset_map = {}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_offset_map, __pyx_t_1) < 0) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":3858
 * 
 * # TODO: better name?
 * def _get_offset(name: str) -> BaseOffset:             # <<<<<<<<<<<<<<
 *     """
 *     Return DateOffset object associated with rule name.
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_9_get_offset, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_offset, __pyx_t_1) < 0) __PYX_ERR(0, 3858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4048
 *     str day_opt,
 *     int modby=3,
 *     NPY_DATETIMEUNIT reso=NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 * ):
 *     """
 */
  __pyx_k__64 = NPY_FR_ns;

  /* "pandas/_libs/tslibs/offsets.pyx":4114
 *     int months,
 *     str day_opt=None,
 *     NPY_DATETIMEUNIT reso=NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 * ):
 *     """
 */
  __pyx_k__66 = NPY_FR_ns;

  /* "pandas/_libs/tslibs/offsets.pyx":4110
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def shift_months(             # <<<<<<<<<<<<<<
 *     ndarray dtindex,  # int64_t, arbitrary ndim
 *     int months,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_13shift_months, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_shift_months, __pyx_t_1) < 0) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4195
 *     ndarray i8other,
 *     int periods,
 *     NPY_DATETIMEUNIT reso=NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 * ):
 *     """
 */
  __pyx_k__67 = NPY_FR_ns;

  /* "pandas/_libs/tslibs/offsets.pyx":4262
 * 
 * 
 * def shift_month(stamp: datetime, months: int, day_opt: object = None) -> datetime:             # <<<<<<<<<<<<<<
 *     """
 *     Given a datetime (or Timestamp) `stamp`, an integer `months` and an
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_15shift_month, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_shift_month, __pyx_t_1) < 0) __PYX_ERR(0, 4262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":4391
 * 
 * 
 * def roll_qtrday(other: datetime, n: int, month: int,             # <<<<<<<<<<<<<<
 *                 day_opt: str, modby: int) -> int:
 *     """
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_19roll_qtrday, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_qtrday, __pyx_t_1) < 0) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseOffset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_21__pyx_unpickle_BaseOffset, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseOffset, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BaseOffset__set_state(<BaseOffset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseOffset__set_state(BaseOffset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._cache = __pyx_state[0]; __pyx_result.n = __pyx_state[1]; __pyx_result.normalize = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6tslibs_7offsets_23__pyx_unpickle_RelativeDeltaOffset, NULL, __pyx_n_s_pandas__libs_tslibs_offsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RelativeDeltaOffs, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/_libs/tslibs/offsets.pyx":1
 * import operator             # <<<<<<<<<<<<<<
 * import re
 * import time
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_kwds___get___line_437, __pyx_kp_u_Return_a_dict_of_extra_paramete) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_copy_line_538, __pyx_kp_u_Return_a_copy_of_the_frequency) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_name___get___line_591, __pyx_kp_u_Return_a_string_representing_th) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_freqstr_line_614, __pyx_kp_u_Return_a_string_representing_th_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_on_offset_line_727, __pyx_kp_u_Return_boolean_whether_a_timest) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_anchored_line_837, __pyx_kp_u_Return_boolean_whether_the_freq) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_month_start_line_8, __pyx_kp_u_Return_boolean_whether_a_timest_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_month_end_line_867, __pyx_kp_u_Return_boolean_whether_a_timest_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_quarter_start_line, __pyx_kp_u_Return_boolean_whether_a_timest_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_quarter_end_line_8, __pyx_kp_u_Return_boolean_whether_a_timest_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_year_start_line_90, __pyx_kp_u_Return_boolean_whether_a_timest_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_BaseOffset_is_year_end_line_919, __pyx_kp_u_Return_boolean_whether_a_timest_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_Tick_nanos___get___line_1001, __pyx_kp_u_Return_an_integer_of_the_total) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_to_offset_line_3889, __pyx_kp_u_Return_DateOffset_object_from_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "util.pxd":220
 * 
 * 
 * cdef inline const char* get_c_string(str py_string) except NULL:             # <<<<<<<<<<<<<<
 *     return get_c_string_buf_and_size(py_string, NULL)
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init pandas._libs.tslibs.offsets", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pandas._libs.tslibs.offsets");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

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

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            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;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == 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
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #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

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        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;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    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 PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

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

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

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* MergeKeywords */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        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);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* py_abs */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* py_dict_pop */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3
    if ((1)) {
        return _PyDict_Pop(d, key, default_value);
    } else
#endif
    if (default_value) {
        return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
    } else {
        return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
    }
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_RemainderObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_RemainderObjC_ZeroDivisionError(b)
            x = a % b;
            x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
            }
        }
                __Pyx_PyInt_RemainderObjC_ZeroDivisionError(b)
                x = a % b;
                x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla % llb;
                llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
}
#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
    _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

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_TrueDivideObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_TrueDivideObjC_ZeroDivisionError(b)
            if (8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) {
                return PyFloat_FromDouble((double)a / (double)b);
            }
            return PyInt_Type.tp_as_number->nb_true_divide(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            }
        }
                __Pyx_PyInt_TrueDivideObjC_ZeroDivisionError(b)
                if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53)))
                        || __Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) {
                    return PyFloat_FromDouble((double)a / (double)b);
                }
                return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            return PyLong_FromLong(x);
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            if (unlikely(zerodivision_check && b == 0)) {
                PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero");
                return NULL;
            }
            PyFPE_START_PROTECT("divide", return NULL)
            result = ((double)a) / (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
            }
        }
                __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(long)*3+2];
    char *dpos, *end = digits + sizeof(long)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    long remaining;
#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 (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (long) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (long) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (long) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* ModInt[long] */
static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#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 (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** 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_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyList_New(0);
    dest = PyList_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyListObject*)src)->ob_item + start,
        ((PyListObject*)dest)->ob_item,
        length);
    return dest;
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyTuple_New(0);
    dest = PyTuple_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyTupleObject*)src)->ob_item + start,
        ((PyTupleObject*)dest)->ob_item,
        length);
    return dest;
}
#endif

/* ModInt[__pyx_t_5numpy_int32_t] */
static CYTHON_INLINE __pyx_t_5numpy_int32_t __Pyx_mod___pyx_t_5numpy_int32_t(__pyx_t_5numpy_int32_t a, __pyx_t_5numpy_int32_t b) {
    __pyx_t_5numpy_int32_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_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;
}

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#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;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < 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);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != 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);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    #if PY_MAJOR_VERSION == 2
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    #else
    PyTypeObject *methoddescr_type = &PyMethodDescr_Type;
    #endif
    if (__Pyx_TypeCheck(method, methoddescr_type))
#endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

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

/* None */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  #ifdef WITH_THREAD
  PyGILState_STATE _save = PyGILState_Ensure();
  #endif
  err = !!PyErr_Occurred();
  #ifdef WITH_THREAD
  PyGILState_Release(_save);
  #endif
  return err;
}

/* Declarations */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = (float)(1.0) / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = (float)(1.0) / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = (double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = (double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(npy_int64) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(npy_int64) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(npy_int64) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(npy_int64) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (npy_int64) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (npy_int64) 0;
                case  1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0])
                case 2:
                    if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) {
                            return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) {
                            return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, 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(npy_int64) >= 4 * PyLong_SHIFT) {
                            return (npy_int64) (((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (npy_int64) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(npy_int64) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (npy_int64) 0;
                case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(npy_int64,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                            return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                            return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, 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(npy_int64) - 1 > 4 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, 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(npy_int64) - 1 > 4 * PyLong_SHIFT) {
                            return (npy_int64) ((((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(npy_int64) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            npy_int64 val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (npy_int64) -1;
        }
    } else {
        npy_int64 val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (npy_int64) -1;
        val = __Pyx_PyInt_As_npy_int64(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to npy_int64");
    return (npy_int64) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to npy_int64");
    return (npy_int64) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode neg_one = (enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) -1, const_zero = (enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_6pandas_5_libs_6tslibs_6dtypes_PeriodDtypeCode),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NPY_DATETIMEUNIT(NPY_DATETIMEUNIT value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const NPY_DATETIMEUNIT neg_one = (NPY_DATETIMEUNIT) -1, const_zero = (NPY_DATETIMEUNIT) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NPY_DATETIMEUNIT) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NPY_DATETIMEUNIT) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(NPY_DATETIMEUNIT) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(NPY_DATETIMEUNIT) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(NPY_DATETIMEUNIT) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NPY_DATETIMEUNIT),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE NPY_DATETIMEUNIT __Pyx_PyInt_As_NPY_DATETIMEUNIT(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const NPY_DATETIMEUNIT neg_one = (NPY_DATETIMEUNIT) -1, const_zero = (NPY_DATETIMEUNIT) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(NPY_DATETIMEUNIT) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (NPY_DATETIMEUNIT) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (NPY_DATETIMEUNIT) 0;
                case  1: __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, digit, digits[0])
                case 2:
                    if (8 * sizeof(NPY_DATETIMEUNIT) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NPY_DATETIMEUNIT) >= 2 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) (((((NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NPY_DATETIMEUNIT) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NPY_DATETIMEUNIT) >= 3 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) (((((((NPY_DATETIMEUNIT)digits[2]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NPY_DATETIMEUNIT) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, 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(NPY_DATETIMEUNIT) >= 4 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) (((((((((NPY_DATETIMEUNIT)digits[3]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[2]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (NPY_DATETIMEUNIT) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(NPY_DATETIMEUNIT) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NPY_DATETIMEUNIT, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(NPY_DATETIMEUNIT) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NPY_DATETIMEUNIT, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (NPY_DATETIMEUNIT) 0;
                case -1: __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 2 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) (((NPY_DATETIMEUNIT)-1)*(((((NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(NPY_DATETIMEUNIT) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 2 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) ((((((NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 3 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) (((NPY_DATETIMEUNIT)-1)*(((((((NPY_DATETIMEUNIT)digits[2]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NPY_DATETIMEUNIT) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 3 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) ((((((((NPY_DATETIMEUNIT)digits[2]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(NPY_DATETIMEUNIT) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, 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(NPY_DATETIMEUNIT) - 1 > 4 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) (((NPY_DATETIMEUNIT)-1)*(((((((((NPY_DATETIMEUNIT)digits[3]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[2]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NPY_DATETIMEUNIT) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NPY_DATETIMEUNIT, 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(NPY_DATETIMEUNIT) - 1 > 4 * PyLong_SHIFT) {
                            return (NPY_DATETIMEUNIT) ((((((((((NPY_DATETIMEUNIT)digits[3]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[2]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[1]) << PyLong_SHIFT) | (NPY_DATETIMEUNIT)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(NPY_DATETIMEUNIT) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NPY_DATETIMEUNIT, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(NPY_DATETIMEUNIT) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NPY_DATETIMEUNIT, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            NPY_DATETIMEUNIT val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (NPY_DATETIMEUNIT) -1;
        }
    } else {
        NPY_DATETIMEUNIT val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (NPY_DATETIMEUNIT) -1;
        val = __Pyx_PyInt_As_NPY_DATETIMEUNIT(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to NPY_DATETIMEUNIT");
    return (NPY_DATETIMEUNIT) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to NPY_DATETIMEUNIT");
    return (NPY_DATETIMEUNIT) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(npy_int32) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(npy_int32) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(npy_int32) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int32),
                                     little, !is_unsigned);
    }
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    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);
}

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (Py_REFCNT(self) > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *frame = self->gi_frame;
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr
#define __PYX_HAVE_RT_ImportVoidPtr
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, desc);
        goto bad;
    }
    *p = PyCObject_AsVoidPtr(cobj);}
#endif
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
